 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Fri Mar 30, 2007 2:04 am Post subject: Reading XML file with Polish chars |
|
|
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
|
Posted: Mon Apr 02, 2007 8:12 am Post subject: Re: Reading XML file with Polish chars |
|
|
<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
|
Posted: Tue Apr 03, 2007 2:10 am Post subject: Re: Reading XML file with Polish chars |
|
|
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
|
Posted: Tue Apr 03, 2007 8:13 am Post subject: Re: Reading XML file with Polish chars |
|
|
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 |
|
 |
|
|
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
|
|