String encoding questions


Subject: String encoding questions
From: David Mandelin (mandelin@cs.wisc.edu)
Date: Wed Aug 22 2001 - 15:38:29 CDT


1. When I see a string variable of type 'char *' in AbiWord, how do I
tell if it is ASCII, native, or something else?

2. What is the Right Way to convert a string from ASCII to Unicode (or
native to Unicode) in AbiWord? I found 4 ways: (1) UT_Mbtowc, (2)
UT_iconv, (3) UT_convert, and (4) XAP_EncodingManager::nativeToU.
Methods (1) and (4) convert a character at a time.

3. What exactly is UT_convert supposed to do? I ask because the comment
above it is incorrect, it doesn't quite work if you are converting to a
wide-char encoding, and it doesn't seem to be used anywhere.

Thanks.



This archive was generated by hypermail 2b25 : Wed Aug 22 2001 - 15:38:40 CDT