AJAX requests stored as UTF-8 even if a non-UTF-8 charset is in use
|Reported by:||iansealy||Owned by:||azaozz|
AJAX responses are always sent in UTF-8. If a blog is using a non-UTF-8 charset then the data will potentially be stored incorrectly and any text will often end up garbled.
For example, if your blog uses ISO-8859-1 and some text submitted via AJAX contains non-ASCII characters then they'll be stored in the database as UTF-8 double bytes rather than their ISO-8859-1 single byte equivalents. Since these characters will be displayed as if they're ISO-8859-1 you'll just end up seeing garbage.
The attached hack simply converts all AJAX responses from UTF-8 to the blog's charset using iconv.
I've put this as low priority since most blogs probably use UTF-8. I've also put this in the Autosave component, but obviously all AJAX responses are affected.
Change History (12)
- Keywords has-patch added; AJAX UTF-8 removed
- Milestone changed from Unassigned to 2.9
- Cc iansealy added
- Summary changed from AJAX responses stored as UTF-8 even if a non-UTF-8 charset is in use to AJAX requests stored as UTF-8 even if a non-UTF-8 charset is in use
- Keywords early removed
- Milestone changed from Awaiting Triage to Future Release