[fpc-devel] ThousandSeparator

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Nov 26 00:00:26 CET 2014


On Tue, 25 Nov 2014 19:36:45 +0100
Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:

>[...]
> > Maybe a widechar is sufficient ? Making it a string is more invasive 
> > than making it a widechar.
> 
> Are all possible separators members of the Unicode BMP?

I found 12 thousand-separators and they are all in the BMP.
It seems even Klingon's thousand separator is in the BMP, even though
the digits are not.


> What when a properly decorated string has to be converted to a specific 
> (AnsiChar) codepage?
>
> I'd assume that national separators are part of the according codepage, 
> but is that always true?

Yes, because the thousand-separator comes from the OS in system code
page.
The UTF-16 version of the RTL can query under Windows the GetLocalInfoW
instead of GetLocaleInfoA.

When someone changes the DefaultSystemCodepage he has to set the format
settings himself. If this is CP_UTF8, then GetLocalInfoW can be used.


Mattias



More information about the fpc-devel mailing list