[Top][All Lists]

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

Re: Unicode changes in CVS. Please test.

From: Markus Plail
Subject: Re: Unicode changes in CVS. Please test.
Date: Sat, 28 Sep 2002 11:38:50 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

Hi Pawel!

* Pawel Kot writes:
>On Fri, 27 Sep 2002, Markus Plail wrote:
>>Please test the new unicode code in CVS. I succesfully wrote chinese
>>characters to my phonebook (which it obviously couldn't display) and
>>read them back. Hu Gang's test also worked fine.
>>So please test SMS sending and all other stuff you can think of.

>More thoughts on the fix. For now just on decoding (encoding seems also
>a bit wrong).

>unsigned int char_decode_unicode(...)
>        int i, length = 0, pos = 0;

>        for (i = 0; i < len / 2; i++) {
>                length = wctomb(dest, (src[i * 2] << 8) | src[(i * 2) + 1]);
>                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>The problem here is that we assume that the wide character is 2 bytes
>wide. I'm afraid it is more complicated. We should do something like:

I don't know if it's really necessary. MB_CUR_MAX is max 2 on any
locale in Linux I think. I have tried it with several different
chinese/corean locales.
But I changed some things according to suggestions from Hu Gang. I am
not too sure about the UCS2 stuff, but I think we have to wait until
someone tests it with a Siemens phone. I attach the whole file as the
patch wouldn't be much smaller, because I rearranged some functions.


Attachment: gsm-encoding.c
Description: Text document

reply via email to

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