PDA

View Full Version : Generated Xml with Asp, encoding problem.


simonboris
04-05-2004, 11:26 PM
Allright, in flash i load and asp file using the following piece of code:

my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.load("xml/my_file.asp");

in the asp file, in i am doing 'response.write' for each xml node and xml header, so i am generating the xml file via asp, like the following:

Response.write "<?xml version='1.0' encoding='UTF-8'?>"
Response.write "<xXml>"
Response.write "<xdata langue='Français' name='Étienne' ville='Montréal'>"
Response.write "<xdata langue='Français' name='Valérie' ville='St-Jérôme'>"
Response.write "</xXml>"

I have trouble with the french spécial character, (like these: éÃ*ôè etc...).
When i create an xml file in notepad, and do a save as with an UTF-8 encoding instead of ANSI encoding, it works, i can see my character.

The problem is that i am simulating a xml file on the fly with asp, it's not physically on my server (physically ?? --> you know what i mean).

How can i encode my asp file, so it send a real UTF-encoding ?
Thx