madsovenielsen Posted February 7, 2011 Share Posted February 7, 2011 HelloWe have a site with a form using search suggest on a text field.We are using the json2.js lib for parsing the data from a asp file over xmlHttpEverything is fine in IE7-9, Chrome, Safari. But Firefox have a charset problem.If the string from json2 contains æ ø or å they dont display right. The rest of the string is fine.Example: �Mejlshede L�se/N�gler A/S Theres only a problem if the data passes through json2.jsThe data in the database is encoded using ISO-8859-1Any help is greatly appriciated/mads Link to comment Share on other sites More sharing options...
[dx] Posted February 7, 2011 Share Posted February 7, 2011 I suggest encodeURI() from Javascript. Link to comment Share on other sites More sharing options...
madsovenielsen Posted February 7, 2011 Author Share Posted February 7, 2011 I suggest encodeURI() from Javascript.I dont think that will do the trick. Then the string will be displayed like:Mejlshede%20L%C3%A5se/N%C3%B8gler%20A/S Thats actually worse :)/mads Link to comment Share on other sites More sharing options...
ApocalypeX Posted February 7, 2011 Share Posted February 7, 2011 I dont think that will do the trick. Then the string will be displayed like:Mejlshede%20L%C3%A5se/N%C3%B8gler%20A/S Thats actually worse :)/mads You can then decode it. Link to comment Share on other sites More sharing options...
madsovenielsen Posted February 7, 2011 Author Share Posted February 7, 2011 Yeah. i do need to use it where i generate the json data :)Works now. :)/mads Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.