[fpc-pascal] Unicode characters in source code
Graeme Geldenhuys
graemeg.lists at gmail.com
Wed Apr 21 12:03:03 CEST 2010
Tomas Hajny het geskryf:
>
> What do you mean by "messing with the -Fcutf8 parameter"? If you include
> some character constants outside the us-ascii set, you should always tell
> the compiler how to evaluate them, because the evaluation depends on the
fpGUI uses UTF-8 internally on all platforms. Specifying some Unicode
characters as a sequence of bytes stored inside an TfpgString type (alias
for AnsiString) causes no problems with FPC. To the compiler it's simply a
sequence of bytes. fpGUI has it's one UTF-8 file and string manipulation
functions.
The usage of #xxxx format also overcomes some problems with editors not
fully supporting Unicode or when you use a non-Unicode font in your editor.
For example, I use a non-Unicode font (Raize) under Linux with Lazarus IDE.
If I try and insert true Unicode characters inside the editor, things
screw-up and text is garbled.
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/
More information about the fpc-pascal
mailing list