Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

open XML with weired chars like ° and German "Umlaute"

473 views
Skip to first unread message

Max Odendahl

unread,
Sep 9, 2003, 6:42:04 PM9/9/03
to
Hi,

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


Marc Scheuner

unread,
Sep 10, 2003, 1:51:29 AM9/10/03
to
>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?

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

Boris Nienke

unread,
Sep 10, 2003, 3:26:44 AM9/10/03
to
On Wed, 10 Sep 2003 00:42:04 +0200, Max Odendahl wrote:

> 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

0 new messages