Thanks Lukas, but you kind of lost me there. I'm using BCB 2006 and the data is stored as regular ANSI into a StringList. Can I then use
pMM->AddPartTextEx( pStringList, NULL, UTF_8, true, ME_8BIT ); 2009/2/16 Lukas Gebauer <gebyl...@mlp.cz>: >> pMM->AddPartTextEx( pStringList, NULL, ISO_8859_1, true, ME_8BIT ); >> >> Is is possible to change that line so that all current English users >> and the new Greek user would be supported? Or is it not as easy as >> that? > > Best way is use unicode, especially UTF-8 encoding. It can contain > all chars for all reasonable languages. ASCII chars are encoded as > is, just high-bit chars are encoded as sequence 8-bit chars. > > What is important, UTF-8 encoded string can be freely assigned to > Ansistring (datatype UTF8string in your Delphi is just alias for > AnsiString.). > > So, you must have pStringList with content in UTF-8 instead of Ansi. > You can get your data in any encoding and convert it into UTF-8 > encoding and then assign to your stringlist. > > Yes, you can do this, but if you are doing it in D2009, you must > assign it without implicit charset conversion, otherwise D2009 > convert your UTF-8 back to Ansi charset! Previous Delphi versions not > doing any implicit conversions. > > Yes, datas in stringlist looks crap at this stage, because data are > in UTF-8, but it never mind, it is OK. Important is - you have data > in correct code and you know, this is not ANSI, but UTF-8. :-) > > And next you can add content as UTF-8 encoded part by: > > pMM->AddPartTextEx( pStringList, NULL, UTF_8, true, ME_8BIT ); > > > -- > Lukas Gebauer. > > E-mail: gebau...@mlp.cz > http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib. > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > synalist-public mailing list > synalist-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/synalist-public > ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public