[fpc-devel] Unicode support - for the 20th time... ;-)
graemeg.lists at gmail.com
Thu Nov 20 10:58:11 CET 2008
On Thu, Nov 20, 2008 at 11:37 AM, Florian Klaempfl
<florian at freepascal.org> wrote:
> FPC supports Unicode, in 2.3.x is the UnicodeString type available being a
> ref. counted utf-16 string on all platforms.
OK, I'll try to switch fpGUI's TfpgString type to alias UnicodeString
an see what happens. Obviously this will be done in a separate branch,
not to screw with Trunk.
So where can I find out what has been implemented and what is missing?
Some or other roadmap, like Lazarus has for it's LCL.
Does 2.3.x with UnicodeString support the following (off the top of my head).
* TStringList.LoadFromFile() - what happens if file is UTF-8 encoded
like under Linux.
* Does it support > 1byte Locale variables for Currency Delimiter,
etc.. Russian locale
requires a >1 byte char.
* FindFile, FindFirst? Do they handle Unicode filenames? What about
other file IO calls.
* Copy, Length, Pos etc...?
* What about usage like: SomeString[x] := 'A';
* What if we call external API's with string parameters? XLib,
OpenGL, Win32 etc?
* Does UnicodeString work on all platforms? Linux, Windows for a start?
And the list goes on.... Is there a wiki page (like the Lazarus LCL
How to I enable UnicodeString in 2.3.x or do I just use UnicodeString
instead of String type?
ls := TStringList.Create;
s := ls; // s now contains a UTF-16 encoded string?
> They add it only because they insist on using utf-8 :)
At this point I don't care what encoding, the final result is the
same. UTF8 was just easier to support in fpGUI and automatically
handled > BMP support. But it would be nice if there was something
that wasn't very Windows centric. After all, FPC runs on more than
just Windows nad there are lots of different unix environments, which
all seem to use UTF-8 instead.
But like I said, the final result is the same -- supporting Unicode.
Calling external library API must just be handled with care, but I
already do that for fpGUI under Windows anyway.
- Graeme -
fpGUI - a cross-platform Free Pascal GUI toolkit
More information about the fpc-devel