encode - How to decode unexpected strings from users? -
i've published app, , find of comments this: ð ðµðºð°ð¼ðµð´ñ
i have googled lot , cannot decode comment not shown way. way stored in database; can in cyrillic, not decode well. clue on how understand kind of comments?
these appear doubly encoded html entities. example, &
turned &
, again turned &
when decoding data twice using this online tool (there many others) result
РекамедÑ
that unicode data, e.g. utf-8 in non-western character set cyrillic or arabic,
- was misinterpreted single-byte input
- was garbled misguided "sanitation" method, possibly call or 2 php's
htmlentities()
(which incidentally assumes single-byte iso-8859-1 encoding default in older versions, call function whole source of problem).
the fix need on server side.
if using php, see utf-8 way through handy guide.
Comments
Post a Comment