Graeme Geldenhuys wrote 13 lines
2009/10/2 :
> On Linux and cs_CZ.UTF-8 locale is thousand separator set to
> NO-BREAK SPACE (UTF-8: 0xC2 0xA0).
>
> But ThousandSeparator variable is defined as Char. Fpc sets
> ThousandSeparator=0xA0 and kylix ThousandSeparator=0xC2.
>
> Any ideas how to correctly solve it?
This is a know problem reported by me some months ago. Unfortunately
there is no fix in FPC until it full supports unicode with a char > 1
byte.
Why not use IFDEF-ed definition *Separators as strings for backward compatibility.
{$IFDEF SEPARATORS_AS_STRINGS}
ThousandSeparator: string;
...
{$ELSE}
ThousandSeparator: Char;
{$ENDIF}
Perhaps somebody do not want to use Char=WideChar in whole project. Maybe I.
In the mean time, you will have to define your own locale constants
with correct type sizes and manually do formatting. A pain in the
butt, I know.
For me I solve it by hack replacing 0xC2 or 0xA0 to normal space 0x20.
Petr
Ing. Petr Kristan
.
EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
tel: +420 466335223 Czech Republic (Eastern Europe)
fax: +420 466510709