[lazarus] Special characters under Window$ and XPM

Sebastian Günther sguenther at gmx.de
Sat May 5 11:55:07 EDT 2001


"Luis R. Hilario" wrote:
> 
> 1- Special characters:
> -------------------------
> If a string contains a special character does not appear anything.
> Caption := '© 2001 Luis Digital.'; //© = (C)
> The exit is equal to: nothing (invisible).
> 
> The solution that myself went to create a unit that converts some
> special characters so that they can be read by GTK-Windows.

AFAIK, GTK uses UTF-8 as character encoding on Win32 (on Linux it uses
whatever you configured, ISO8859-1 (=the well-known ANSI 8-bit charset)
is default). Some information on this can be found here:
http://www.freepascal.org/unicode/
(Note: This stuff will get obsolete in the future, when FPC has full
Unicode support on its own)

I wrote a small unit which offeres UTF-8 conversion functions as well as
UTF-8 versions of Length and StrLen (which count the number of
characters, and not the number of bytes, as Length and StrLen would do.)
You can get it at the location given above.


- Sebastian






More information about the Lazarus mailing list