Is your input stream really UTF-8?
I would dump the data you're getting somewhere as bytes (or look at it
in the debugger if it's small) and double check the character set.
The accented "o" is 0xF3 in ISO-8859-1
http://www.fileformat.info/info/unicode/char/f3/index.htm
In UTF-8, the 0xF3 is a special character prefix, used by, among other
things, mathematical symbols:
http://download.oracle.com/docs/cd/B10501_01/server.920/a96529/appb.htm#952448
-- Kostya
19.05.2011 0:33, bobetko пишет:
I have issue with spanish characters in java string. I have a content
RSS feed and when i try to transform it to java object using
InputStreamReader, I get outputs like "cómo" which should be "cómo".
This is happening with other spanish characters like
á = á é = é í = à ó = ó ú = ú
and more..
How can I convert these characters to proper spanish characters?
Here is how my InputStreamReader looks like:
Reader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"),
1024);
I tried doing my own method like this:
public static String fixSpanish(String s)
{
s = s.replaceAll("á", "á");
s = s.replaceAll("é", "é");
s = s.replaceAll("Ã", "í");
s = s.replaceAll("ó", "ó");
s = s.replaceAll("ú", "ú");
Log.d(TAG, s);
return s;
}
But, this didn't work. None of search combinations are ever found.
Any ideas?
Thanks in advance
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en