BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reading XML file with Polish chars

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi XML
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri Mar 30, 2007 2:04 am    Post subject: Reading XML file with Polish chars Reply with quote



Hi.

I want read xml file with UTF-8 encoding.
I use to do TXMLDocument, but I have problem with Polish chars.


Can you help me.
Paul.
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Apr 02, 2007 8:12 am    Post subject: Re: Reading XML file with Polish chars Reply with quote



<pawel.palys (AT) gmail (DOT) com> wrote in message
news:1175202261.865012.41700 (AT) r56g2000hsd (DOT) googlegroups.com...

Quote:
I want read xml file with UTF-8 encoding.
I use to do TXMLDocument, but I have problem with Polish chars.

Can you be more specific?


Gambit
Back to top
Nils Haeck
Guest





PostPosted: Tue Apr 03, 2007 2:10 am    Post subject: Re: Reading XML file with Polish chars Reply with quote



Saving a document with standard Windows codepage encoding with a standard
editor, and just setting 'encoding = "UTF-8"' in the xml header won't help.
You will have to save the file as UTF-8 file (with the correct BOM at the
front).

Whether there are Polish, Arabic, or Japanese characters in the file doesn't
matter to UTF-8, *all* characters will get converted to their unicode
equivalent. Most (Western) characters will take up just one byte, some two
bytes, and some three bytes (and even some exotic ones 4 or 5).

Try to use a unicode enabled text editor, and make sure to set the *file*
encoding to UTF-8 as well (so not only the xml header).

For reading correctly encoded UTF-8 XML, and converting data in it to
"widestring" to be used in Delphi/TntControls, you can have a look at our
NativeXml component:
http://www.simdesign.nl/xml.html

Nils Haeck
www.simdesign.nl

<pawel.palys (AT) gmail (DOT) com> schreef in bericht
news:1175202261.865012.41700 (AT) r56g2000hsd (DOT) googlegroups.com...
Quote:
Hi.

I want read xml file with UTF-8 encoding.
I use to do TXMLDocument, but I have problem with Polish chars.


Can you help me.
Paul.
Back to top
sslavo
Guest





PostPosted: Tue Apr 03, 2007 8:13 am    Post subject: Re: Reading XML file with Polish chars Reply with quote

pawel.palys (AT) gmail (DOT) com wrote / napísal(a):
Quote:
Hi.

I want read xml file with UTF-8 encoding.
I use to do TXMLDocument, but I have problem with Polish chars.


Can you help me.
Paul.

There are UTF8Decode and UTF8Encode functions. Try to use them.


SSlavo
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi XML All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.