On Thu, 24 Jun 2004, Shawn Walker wrote:
How can I utilize c-client charset table to convert characters?
I know that utf8_text() can convert the characters, but I'm having mixed results.

What, exactly, are you trying to do?

utf8_text() is the routine to convert from arbitrary character sets into UTF-8 (normalized with pre-composed characters). The new utf8_cstext() routine will convert normalized pre-composed UTF-8 into most character sets (as best it can; Greek text doesn't convert well into Chinese...).

To do conversion from one non-UTF-8 character set into another non-UTF-8 character set, you can use the new utf8_cstocstext() routine (I forget if this made it into imap-2004, but it's in imap-2004a). You can do things faster and with less memory if you set up the conversion tables yourself using utf8_rmap() -- Pine does this; look at the routines in strings.c and filter.c in the Pine sources.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

Reply via email to