xml file encoding

  • Thread starter tomislav.vujnovac
  • Start date
T

tomislav.vujnovac

I need to generate xml file with data from ms sql server.
That xml is used in some third party java program.
That program need xml file that is saved as "windows-1250" but in first
line is: "<?xml version="1.0" encoding="UTF-8"?>"
When I make xml file as UTF-8, I can not open it with that java
program, but when I make as "windows-1250" than I can open it but I can
not see CE characters

Tomislav
 
J

Joerg Jooss

Hello (e-mail address removed),
I need to generate xml file with data from ms sql server.
That xml is used in some third party java program.
That program need xml file that is saved as "windows-1250" but in
first
line is: "<?xml version="1.0" encoding="UTF-8"?>"
When I make xml file as UTF-8, I can not open it with that java
program, but when I make as "windows-1250" than I can open it but I
can
not see CE characters

Simply changing the declaration to another encoding's name doesn't change
the real encoding. You have to create the XML file accordingly.

Cheers,
 
T

TomislaW

I just realizeI just realize that when I create file from .net I get
file encoded as "Unicode (UTF-8 with signature) - Codepage 65001".
The third party java program create files as "Unicode (UTF-8 without
signature) - Codepage 65001", and can not read file "with signature".
Is it possible to create "without signature" file from .net?

Tomislav
 
T

TomislaW

I find out solution:
XmlTextWriter xtw = new XmlTextWriter(_path, new UTF8Encoding(false))
(false is default)
so far I have
XmlTextWriter xtw = new XmlTextWriter(_path, Encoding.UTF8)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top