I'm having problems with IXMLDocument and opening XML files, which include
e.g ä,ü,ö and so on. I always get an error when trying to open
Someone told me this should not be a problem, because XML Files are UTF-8.
So first what does UTF-8, UTF-16, ISO and so on mean?
And how can I open a XML Document with German Umlaute in it? I tried
xml.encode:='UTF-8', but this didn't work
Thanks for your help
Max Odendahl
UTF-8 and UTF-16 are two "versions" of Unicode - an 8- and a 16-bit
version of Unicode. That in turn is a character set defintion (like
ASCII) which normally is 16-bit (2 bytes per char) and thus can
contain all the characters in most common alphabets - not just our
latin characters (including all the German umlaut, French accents and
so forth), but also Greek, Cyrillic, Thai, Chinese, Japanese, and many
more - all in one character set, all with exactly one Unicode encoding
for each character.
Check out www.unicode.org for more info on Unicode - it's the coming
trend, WinNT/2000/XP/2003 already fully support it, all the .NET
languages (C#, managed C++, VB.NET, and upcoming Delphi for .NET) will
fully use and support Unicode.
For "legacy" Delphi, I found that Primoz Gabrijelcic's TGpTextFile
component did the best job of opening, reading, creating Unicode files
they're free, too!
http://17slon.com/gp/gp/index.htm
So first off, you'd need to really find out what your XML file is
encoded with - if you have a good text editor on a NT-based platform
(such as TextPad - www.textpad.com), you'll be able to open that file
and look at its properties and see what kind of file it is.
Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
> I'm having problems with IXMLDocument and opening XML files, which include
> e.g ä,ü,ö and so on. I always get an error when trying to open
>
> Someone told me this should not be a problem, because XML Files are UTF-8.
not necessarily
> And how can I open a XML Document with German Umlaute in it? I tried
> xml.encode:='UTF-8', but this didn't work
this is the very first line in one of my XML-Files with which i'm able to
read german umlauts:
<?xml version="1.0" encoding="ISO-8859-1"?>
maybe this will help you
Boris