[fpc-devel] Russian locale information not compatible with FPC locale variables

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Jul 29 09:54:54 CEST 2008


Hi,

A Russian user raised the issue in the fpGUI newsgroups...  fpGUI uses
UTF-8 as the internal string encoding. He noticed that the File Dialog
which displays the file sizes with thousand separators were totally
blank.  On further investigation he noticed that it was FormatFloat()
that caused the issue. FormatFloat uses the ThousandSeparator locale
variable.

In FPC the ThousandSeparator is of type Char which can only hold one
byte. Yet the Russian locale uses the non-breaking space character as
expressed in UTF-8 as 'C2 A0' (bytes) and takes up 2 bytes.  So how do
we assign the Russian ThousandSeparator (U+00A0) in FPC to the
ThousandSeparator variable?


Regards,
 - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-devel mailing list