I just have the string \u0130smail
and I want to convert it to
İsmail and also convert
\u0130 --> İ
\u00E7 --> ç
I tried
String str = "\u0130smail";
sysout(str);
and it worked, but whenever I get the string "\u0130smail"
from the DB or the internet it doesn't give the correct result.
static String deneme(String string){
String string2 = null;
try {
byte[] utf8 = string.getBytes("UTF-8");
string2 = new String(utf8, "UTF-8");
} catch (UnsupportedEncodingException e) {
}
return string2;
}
didn't work either.