I have garbled text è??¥
which is returned by web service (php) fetched from MySql
Now I am trying to decode it to utf-8 in android, but it's not working
I have tried:
String s = "è??¥";// text returned by web service taking it as static for testing
1. not working:
String str = new String(s.getBytes(), "utf-8");
2. not working:
String normalized = Normalizer.normalize(str, Normalizer.Form.NFD);
// also tried NFC, NFKC, NFKD
// also tested by isNormalized its returning true
3. not working:
String str =URLDecoder.decode(s, "utf-8");
all above are giving same output: è??¥
So, please can anyone help me understand what I am doing wrong?
Or please provide me any alternative?
Any help will be much appreciated.
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…