On Sat, Nov 22, 2008 at 9:07 PM, Florian Klaempfl
<[EMAIL PROTECTED]> wrote:
>
> See http://bugs.freepascal.org/view.php?id=11791
OK, but that bug report is about an invalid sequence and getting out
NULL. I'm testing perfectly valid UTF-8 sequence and still getting
NULL result.
>> // U+289A8 CJK UNIFIED IDEOGRAPH-289A8
>> s8 := Char($F0) + Char($A8) + Char($A6) + Char($A8);
>> s16 := UTF8Decode(s8);
>>
>> AssertEquals('Failed on 4', 4, Length(s16));
>> AssertEquals('Failed on 5', UnicodeChar($D862) + UnicodeChar($DDA8), s16)
>>
>> end;
>>
>> Test 4 fails: Expected 4 but was 0.
>> Test 5 fails: to due to Test 4 failure...
>>
>>
>> ---------------[ from unicode description file ]-----------------------
>> U+289A8 CJK UNIFIED IDEOGRAPH-289A8
>>
>> General Character Properties
>>
>> Unicode category: Letter, Other
>>
>> Various Useful Representations
>>
>> UTF-8: 0xF0 0xA8 0xA6 0xA8
>> UTF-16: 0xD862 0xDDA8
>> ------------------------[ end ]----------------------------
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel