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

Martin Schreiber fpmse at bluewin.ch
Tue Jul 29 11:07:04 CEST 2008


On Tuesday 29 July 2008 09.54:54 Graeme Geldenhuys wrote:
>
> 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?
>
MSEgui has a widestring version of the FormatFloat function 
(lib/common/kernel/mseformatstr.pas formatfloatmse). There were no bug 
reports from Russian users, so it seems to work, although I did not test the 
U+00A0 ThousandSeparator...

Martin



More information about the fpc-devel mailing list