5 ms·
I'm on Mac and I've had problems with Chrome sending ajax requests or decoding ajax responses in ISO-8859-1, if I remember well. I had to add "; charset=utf-8"
by tajen 10y ago
I'm on Mac and I've had problems with Chrome sending ajax requests or decoding ajax responses in ISO-8859-1, if I remember well. I had to add "; charset=utf-8" to my headers. I remember it was a browser problem, and I think it was the same for all browsers.
- TazeTSchnitzel 10y agoFor backwards-compatibility's sake, where a web page doesn't specify a character set, browsers will assume the predominant pre-Unicode encoding used in your region.
- scrollaway 10y agoWhy is this still the case? UTF8 is dominant now, wouldn't it make more sense to assume UTF8?
- niftich 10y agoThe older the site, the less likely it is that it will have been updated. Therefore, it's reasonable to assume that newer sites will either declare UTF-8, or can be modified to declare UTF-8, while old sites stay the way they always were, pre-UTF-8. Keeping the backwards-compatibility heuristic the same makes sense.
- TazeTSchnitzel 10y agoOld sites lacked encoding declarations, and old browsers (e.g. early versions of IE) didn't support them. Sites that want UTF-8 can ask for it.