Hi

How am I supposed to handle unicode characters for locale variables?
All locale variables like ThousandSeparator is type Char and there is
no overloaded UnicodeChar versions.  This causes problems in Russian
locales as the example below shows.


  c := UnicodeChar($00A0);  // non-breaking space character
  ThousandSeparator := c;

  s := Format('%10.2n', [123456789.123456]);
  writeln('Russian style No-break Space char  s = ', s);

  writeln('SizeOf(UnicodeChar) = ', SizeOf(c));
  writeln('SizeOf(ThousandSeparator) = ', SizeOf(ThousandSeparator));


And the output is as follows:

Russian style No-break Space char  s = 123�456�789.12
SizeOf(UnicodeChar) = 2
SizeOf(ThousandSeparator) = 1


The ThousandSeparater variable is not big enough to store the
character.  Plus, what's going to happen with > BMP characters?


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to