[android-developers] Re: How do I know what encoding the string when I decoded from the media store?

2011-05-14 Thread Bob Kerns
Java strings are *always* Unicode strings. If you have mojibake, then the problem occurred before you got a Java string, and you have to fix it there. You cannot in general fix the problem, once the string has been misinterpreted. Although sometimes you can get away with your getBytes/new

[android-developers] Re: How do I know what encoding the string when I decoded from the media store?

2011-05-14 Thread Bob Kerns
By the way, you have it backwards, I think. newStr = new String(AlbumCursor.getString(1).getBytes(utf-8), sjis); That is, get the bytes of the string as they are internally, as UTF-8, and then re-interpret them as SJIS. On Friday, May 13, 2011 10:56:49 AM UTC-7, wang wrote: Hi, I have