Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Cannot return XML with UTF-8 chars with ASP. [Thread Next] Re: Cannot return XML with UTF-8 chars with ASP.To: NULL Date: 10/2/2005 7:18:00 AM "brb" <b_bertan@h...> wrote in message news:uBGylL1xFHA.1256@T...... >I am trying to return XML through an ASP page and it simply fails when the XML >contains characters with ascii value is > 128. While I generate my data >dynamically, this simple example -- note the currency symbol -- displays the >same error: "An invalid character was found in text content.". It displays >properly if I use a $ instead of the £ > ------------------------------------------------------------------ > <%@ Language=VBScript %> > <%Response.ContentType="text/xml"%> > <% > Response.Write "<?xml version=""1.0"" encoding=""UTF-8""?>" > Response.Write "<text>Cost £200</text>" %> > ------------------------------------------------------------- > > Thanks, > > --Brian > Try adding: Response.CodePage = 65001 Response.CharSet = "utf-8" before your response.write statements. The first response.write setting the XML declaration can be missed out. -- Joe | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
