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,

  1. was misinterpreted single-byte input
  2. 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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -