Fw: Re: how to convert chinsese-character to utf8?

I use g_convert(string, -1, "UTF-8", "CP950", NULL, NULL, &error) to convert but get the message:
Conversion from character set 'CP950' to 'UTF-8' is not supported.

原邮件发件人名字: James M. Cape
原邮件发件人地址:jcape ignore-your tv

>On Wed, 2003-09-24 at 02:51, yangxiaoli wrote:
>> I use function g_locale_to_utf8() and g_convert() to convert Chinese-character to utf8,but got error message: Invalid byte sequence in conversion input. How to convert it to utf8?
>You should call g_convert, with the src_encoding properly set to the
>same type as the chinese character to convert.
>Known chinese encodings are:
>EUC-CN, GBK, GB18030, ISO-2022-CN
>So, if the character is encoded in BIG5, the proper call is:
>gchar* dest = g_convert (big5_str, -1, "BIG5", "UTF-8", NULL, NULL,
>If the source string is in another encoding, then you can replace "BIG5"
>with the other encoding's name.
>(the last 3 arguments are for bytes_read, bytes_written, and an optional
>error-code/msg return.)
>    Jim Cape
>    http://ignore-your.tv
>    "It is literally true that, like Christianity, Socialism
>     has conquered the world by defeating itself."
>        -- Alexander Berkman, ABC of Anarchism

= = = = = = = = = = = = = = = = = = = =

alula mail15 com

Attachment: signature.asc
Description: Binary data

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]