By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,968 Members | 1,247 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,968 IT Pros & Developers. It's quick & easy.

Printing a UTF-8 encoded XML file

P: n/a
Hi,

I am computing an XML file with all necessary tags, to be used in
dedicated XML software. I am computing it as a text file but don't know
how to do to save it to the disk UTF-encoded. strConv() with constant =
64 does not work, because the default code page of the system is UTF-16
and the XML editor I am using, XMLSpy, expects structured text when
importing text files (so it cannot import my tagged files).

The only way I have found out to convert to UTF-8: copy / paste the
text from a text editor into XMLSpy, and save. But the procedure would
be more elegant without that step. What I am looking for is:
automation.

Can anybody help with this, please?

Reto Hadorn
SIDOS

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 10 Nov 2005 00:58:14 -0800, "re*********@sidos.unine.ch"
<re*********@sidos.unine.ch> wrote:
Hi,

I am computing an XML file with all necessary tags, to be used in
dedicated XML software. I am computing it as a text file but don't know
how to do to save it to the disk UTF-encoded. strConv() with constant =
64 does not work, because the default code page of the system is UTF-16
and the XML editor I am using, XMLSpy, expects structured text when
importing text files (so it cannot import my tagged files).

The only way I have found out to convert to UTF-8: copy / paste the
text from a text editor into XMLSpy, and save. But the procedure would
be more elegant without that step. What I am looking for is:
automation.

Can anybody help with this, please?

Reto Hadorn
SIDOS


Use the MSXML library to build your XML instead of building XML text directly
- this will save you a lot of pain the first time you need a quote mark or a
semicolon in your data, etc., and you can use the SAX writer to output using
whatever text encoding you need. The examples on-line at MSDN and Microsoft
Support will get you through the less obvious steps to do that.
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.