xml encoding and jquery parsing

雨燕双飞 提交于 2019-12-25 06:37:30

问题


Im having some trouble reading xml files using jquery that containts swedish chars (åäö) in my xml.

It doesnt matter if i use

<?xml version="1.0" encoding="UTF-8" ?>

or

<?xml version="1.0" encoding="ISO-8859-1"?>

i will still get a parseerror in jquery. However, if i open the files in notepad++ and save with "utf-8 without BOM" it will work. But this is not an option, since i cant assume that all teh users will do that. How do i solve this? Thanks!


回答1:


What is the parse-error you are receiving?

The most common issue with XML files not working correctly is caused by white space, so maybe worth checking this.

A useful URL is http://www.usingxml.com/Basics/XmlSpace

Thanks



来源:https://stackoverflow.com/questions/7846404/xml-encoding-and-jquery-parsing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!