[fpc-devel] Qt, Java and Unicode support

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Dec 2 13:59:41 CET 2008


On Tue, Dec 2, 2008 at 2:47 PM, Sergei Gorelkin <sergei_gorelkin at mail.ru> wrote:
>
> Unfortunately what those frameworks did isn't directly applicable to FPC.
> First, as I understand, they have only one (UTF-16) string type. This is
> good because it avoids whatever mess related to conversions, but not an
> option for FPC (because FPC requires compatibility with existing code).

Then for backward compatibility use UTF-8 as the only string type.
That's what UTF-8 was designed for - backward compatibility.  That's
also the reason LCL uses UTF-8.


> Second, their string type is an object,

So why can't one flatten that object structure into procedures.

> therefore it is toolkit-specific
> rather than language-specific. It has very little, if any, to do with the
> compiler.

Hence the reason I mentioned Qt. It uses the C compiler, which doesn't
even have a String type. I think it will still be handy to look at the
Qt toolkit, to see how they accomplished the unicode string issues.

> Third, QT is a shared library (and Java framework may also be treated as
> such), and it implements huge Unicode conversion tables without putting them
> into every executable.

Well can't one make that a separate library for Free Pascal
applications as well. If you don't need it, or just simply want ASCII
upper/lower case support, you don't ship the conversion table dll/so
file.

How else was FPC thinking of handling Unicode conversion tables then?
Simply ignoring the problem is not going to make it go away.


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-devel mailing list