UTF-8 Character conversion in glib for ARM - issue in while g_convert for japanese characters



Hi all,

I am facing one issue while converting a character set into UTF-8 format.
I am using the glib function "g_convert()" for converting the character set to UTF-8.
The input string : ‹g-“-Ç
Its Hex values are : 8b 67 96 93 97 c7

When I used gcc version of libc - 2.12.90(Running on PC) - We got the
correct output. Here we given input format as ISO-8859-1.
When we used gcc version of libc - 2.11.1 (Cross compiled for Wind River
and running on the HW) - The function "g_convert()" returns error.

utf8 = g_convert (string , size, "UTF-8", "ISO-8859-1",&bytes_read,&bytes_written,&err);
  err->code = 0
  err->message  = Conversion from character set 'ISO-8859-1' to 'UTF-8' is not supported
  bytes_read = 0,bytes_written = 0
  Output UTF-8 string = (null
We would like to know whether this issue is due to libc version difference.

If I use the english alpabets then I get the correct converted output in the target board.

May I know id there any option we need to give while building the glib for supporting the other languages(japanese/chinese) so that g_convert can safely convert it and give a non-null character.

My host and target boards are little endianess.

All suggestions are welcome.


Many kind regards,
/renjith_g


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