I have text as normal 8-bit characters and I know for example, that
the Windows Codepage 1250, 1252 or 1253 was used. Now I need a
function, that converts the text to unicode. Something like this:
function TextToUnicode(const AText: String; AEncoding: TEncoding):
WideString;
Then I'm looking for a function, that converts special characters to
ASCII (a-z) characters. Examples:
ä >> a
ö >> o
Unicode #261 >> a
Unicode #322 >> l
I know, that this doesn't work for all characters, but it works for
some of the Eastern Europe charactersets.
Any tips are welcome, before I start to type my own conversion table.
cu Christian
> I have text as normal 8-bit characters and I know for example, that
> the Windows Codepage 1250, 1252 or 1253 was used. Now I need a
> function, that converts the text to unicode.
MultiByteToWideChar (a Windows API function) using the correct codepage
parameter does this.
Danny
---
my DIConverters library supports Unicode <-> ANSI (or, more appropriately:
Unicode <-> multi-byte) conversion for more than 130 character sets, encodings
and transformation formats, including of course Windows 1250, 1252 and 1253:
http://www.yunqa.de/delphi/converters/
If you find using those functions to cumbersome, there is also my DIUnicode text
reader and writer library. It has its own build-in conversion and can also be
linked against DIConverters:
http://www.yunqa.de/delphi/unicode/
Regards,
Ralf
Christian Kaufmann <christian...@gmx.net> wrote:
---
The Delphi Inspiration
http://www.yunqa.de/delphi/