[fpc-devel] Save the current FPC UnicodeString!
Mattias Gärtner
nc-gaertnma at netcologne.de
Fri Nov 13 14:28:11 CET 2009
Zitat von Martin Schreiber <fpmse at bluewin.ch>:
> On Friday 13 November 2009 13:26:29 Graeme Geldenhuys wrote:
>> Michael Schnell wrote:
>> > Martin Schreiber wrote:
>> >> On Linux xlib and xft have utf-16 interfaces.
>> >
>> > What exactly are xlib and xft and why does MSE-GUI seemingly use those
>> > while LCL seemingly uses something else ?
>>
>> Martin answered this already. But just to be clear, xlib and xft have
>> both utf-8 and utf-16 interfaces. fpGUI uses the utf-8 interfaces,
>> whereas MSEgui uses the utf-16 interfaces.
>>
> Often strings are converted to UCS4 somewhere in the chain anyway so it
> doesn't matter. utf-16->UCS4 can be a little faster maybe.
For graphic apps the text conversion is hardly measurable.
UTF-16 is not sufficient under linux for file names, because Linux
uses UTF-8 and allows invalid characters. This happens often when
transferring files from Windows.
That's why the RTL file operations must use the system encoding under
Linux and not UTF-16.
Afaik Mac OS X does not allow invalid UTF-8 characters for filenames.
Windows has its codepages, with characters that have no unicode
equivalent. But afaik this is a rare case, so for almost all programs
UTF-16 is sufficient.
Mattias
More information about the fpc-devel
mailing list