gnokii-users
[Top][All Lists]
Advanced

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

Re: question about encoding sequance


From: Daniele Forsi
Subject: Re: question about encoding sequance
Date: Fri, 6 Jun 2008 19:44:33 +0200

2008/6/6 yueyue papa wrote:

> 5> Change code gsm-encoding.c
> static char application_encoding[64] = "";
> ==>
> static char application_encoding[64] = "gb2312";

the correct encoding should be detected at runtime by
gn_char_get_encoding() using get_langinfo_codeset()
can you check what happens in these two functions?

>   In function: static int char_wctomb(char *dst, wchar_t src, MBSTATE *mbs)
>
> cd = iconv_open(gn_char_get_encoding(), "WCHAR_T");
> ==>
> cd = iconv_open(gn_char_get_encoding(), "UTF16");

the correct encoding is UCS-2 (I know they are nearly identical) and
using UCS-2BE should make the following change to
char_unicode_decode() unnecessary

>   In function: unsigned int char_unicode_decode(unsigned char* dest,
> const unsigned char* src, int len)
>
>   wchar_t wc = src[i * 2] << 8 | src[(i * 2) + 1];
> ==>
>   wchar_t wc = src[i * 2] | (src[(i * 2) + 1] << 8 );


> 4> phone book name display has not added UNICODE sequance.

see http://wiki.gnokii.org/index.php/Bug_report
-- 
Daniele Forsi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]