<div id="a">°F</div>
$.get("http://blah.com/go",{'TU':$('#a').text()});
Other info: the 0.5% of the time has been both IE8 & Chrome. All IP's geolocated to Columbia, which makes it seem like a local issue, but we've been unable to replicate it.
Ideas??
So the problem is that sometimes there is a space between the °
and the F
, that space gets translated into a +
, and the server doesn't accept it? If so, why not strip out the space before sending it?
$.get("http://blah.com/go",{'TU':$('#a').text().replace(' ', '')});
// Or a more granular fix
$.get("http://blah.com/go",{'TU':$('#a').text().replace(/°\sF/, '°F')});
How is the text being put into the div? You should output that before checking the server value. I don't think it's likely that you're getting a different encoding of the same text. It's probably something to do with how you're putting it into the page.
Also try setting the page encoding on the server before you get the query string, it could be that different browsers are using a different encoding. UTF-8 is the encoding suggested by w3.org. In Java, you have to make sure you set the encoding before any calls to read anything from the client.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.