On Sunday 14 January 2007 21:47, Florian Klaempfl wrote: > Sebastian Kraft schrieb: > > same thing the other way round: > > > > I read an iso8859 string from a textfile. e.g. the 'ö' is encoded by > > 0xF6. When I output this string to gtk2 listview the 'ö' is drawn as '?'. > > Even when I do utf8encode or ansitoutf8 on the string containing 'ö' it > > is still shown as unknown -> '?' > > As far as I know utf-8 and iso8859 encodings should be compatible on the > > first 255 positions of charset... > > No. Only the first 128 positions. > > You've to write your own code to do so. As said before, Ansistring > means: use the system locale on unixes. So on a utf-8 system ansistrings > are actually utf-8 strings. The RTL can't know which code page it should > use anyways. > > _________________________________________________________________ > To unsubscribe: mail [EMAIL PROTECTED] with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives
If we had PythonForDelphi ported to Lazarus, it would be a trivial task to add a generic form of translation of utf8 text to a desired "page" of iso. The source code for PythonForDelphi is available for download. It is not a trivial task to translate it to Lazarus, though. The source is well commented, but it does have some 10 000 lines of code (including comments). IMHO, Python is the language of the future and porting the PythonForDelphi to Lazarus would make Lazarus a great Python GUI maker. I am willing to contribute to the effort of porting P4D to Lazarus, if I were asked to do so. Kind regards, Al. -- Algis Kabaila (Dr) http://www.pcug.org.au/~akabaila/StructuralAnalysis
pgpd5jXnVGADz.pgp
Description: PGP signature
