views:

321

answers:

1

Hi, i have a script that reads an xml file then produces some document.write javascript lines and sends them to request . I'm getting a weird character (only shows in internet explorer, not firefox). I can't seem to track it down.

Here's a URL of the script being used (has weird chars in IE): http://www.voyagertravelguides.com/test.htm

The source of the javascript tag is where the .net script is

Anyone know what's up? I've tried using ISO-8859-1 on both the script and in a meta tag. I've tried replacing chr(194) in the .NET script

A: 

If you use WriteAllText or WriteAllLines to create the xml file, it can introduce odd characters if you don't specify the encoding scheme.

For example, instead of

   File.WriteAllText(fName, sText)

use

   File.WriteAllText(fName, sText, System.Text.Encoding.Default)
xpda