Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I prevent the automatic inserted encode?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
transform XML with XSL is cool. but in the result there is always encoded inserted like this:

<?xml version=&quot;1.0&quot; encoding=&quot;UTF-16&quot;?>

or :

<meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=&quot;UTF-16&quot;>

but such setting is not always what I want.
how can I tell it don't insert this attribute?
i tried

<xsl:eek:utput method=&quot;xml&quot; encoding=&quot;windows-1252&quot; />

but it is just ignored. :(
 
Hi Jerron,

I gather you're using IE or the Microsoft parser to transform your xml?

With the MSXML parser the only encodings supported are UTF-8 and UTF-16 when you include a processing instruction. All other encodings are ignored and defaulted to UTF-16. The only work-around yet it to manually replace the encoding after the transformation....

Hopefully the've expanded this support with the 4.0 parser.

Good luck!

Jordi Reineman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top