[fpc-devel] twide3.pp on windows

Yury Sidorov jura at cp-lab.com
Mon Jul 16 16:51:10 CEST 2007

From: "Vincent Snijders" <vsnijders at quicknet.nl>
> How is the twide3.pp test supposed to work?
> If I run this in windows, the widestring is converted to an 
> ansistring of length 5 with some wrong chars. Do I need to set a 
> special code page and how can I do that?

As I see, on Windows widestring is converted to ansi encoding not 
utf8. This test will work only if current locale is the same as 
'łóżka' string. In other cases the string is converted to 'lozka'.

This test should be skipped on Windows or fixed.

Possible fix is to replace:

    if (w<>'łóżka') then


    if (w<>a) then


More information about the fpc-devel mailing list