[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unicode support
From: |
Markus Plail |
Subject: |
Re: Unicode support |
Date: |
Fri, 27 Sep 2002 10:28:39 +0200 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) |
* Markus Plail writes:
>Hi Pawel!
* Pawel Kot writes:
>>>>>address@hidden 27 September 2002 09:48:51 >>>
>>>I thought the same. And with my tests with Hu's test app wctomb always
>>>returned 1 not 2.
>>>
>>>So I throw the following code into the ring ;-)
>>>
>>>void char_decode_unicode(unsigned char* dest, const unsigned char* src, int
>>>len)
>>>{
>>>int i;
>>>
>>>for (i = 0; i < len; i++)
>>>wctomb(dest + strlen(dest), (src[i * 2] << 8) | src[(i * 2) + 1]);
>>>return;
>>>}
>>>
>>>Works with both my 6210 folders and Hu's test app.
>>I think it won't work. Not sure, but I think it has the current
>>semantics. The whole purpose of this patch is that wide character may
>>be more then 2 bytes wide (for chinese characters, 2 bytes are
>>sufficient for all european languages I think).
>Why wouldn't it support wider characters? wctomb adds them to the end
>of dest. If it's 4 Bytes it adds four bytes. The version now in CVS
>just discards wider characters.
Now I managed to save the test app with the proper encoding (cn-gb) and
I get exactly the same output as Hu:
address@hidden:gnokii]$ ../tst_unicode
c4 |e3 |311|322|ba |c3 |311|355|00 |00 |00 |00 ..12..15....
4fO|60`|00 |311|00 |322|59Y|7d}|00 |311|00 |355|00 |00 |00 |00 O`.1.2Y}.1.5....
40@|b0 |04 |08 |28(|af |04 |08 @...(...
c4 |e3 |311|322|ba |c3 |311|355|00 |00 |00 |00 ..12..15....
regards
Markus
PS: Asia has *way* too many encodings/charsets ;-)
- Re: Unicode support, (continued)
- Re: Unicode support, Pawel Kot, 2002/09/26
- Re: Unicode support, Hu Gang, 2002/09/26
- Re: Unicode support, Pawel Kot, 2002/09/27
- Re: Unicode support, Markus Plail, 2002/09/27
- Re: Unicode support, Hu Gang, 2002/09/27
Re: Unicode support, Pawel Kot, 2002/09/27
Re: Unicode support, Pawel Kot, 2002/09/27