Can I recover utf-8 strings which have been updated without encoding?
I'm working with Java+MySQL and using UTF-8_persian_ci encoding in the database. the other day, I was making a few changes in the project's configs and mistakenly didn't mention "characterEncoding=UTF-8" in the JDBC url开发者_Python百科, then I updated some tables and the UTF-8 characters of them turned into '?'. Is there a possible way to recover those characters?
Sorry, they're gone. By reading from the database on a connection with a non-UTF encoding (likely ISO-8859-1), you forced the characters that don't fit in that encoding to get replaced with question marks. Writing them back to the table lost the information for good.
If you had some mojibake like منتدى...
you would stand a chance of recovering the information, but if all you can get out is question marks, you're probably doomed.
精彩评论