I'm parsing an input stream coming from Facebook. I'm using something like
BufferedReader in =
new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"));
And then in.readLine
to actually read from the stream.
The stream seems to have Unicode characters already encoded in ASCII, so I see things like \u00e4 (with \u actually being two discrete ASCII characters). Right now, I'm fishing for "\u" and decoding the subsequent two hex bytes, turn them into a char and replace the string with them, which is obviously the worst way to do it.
I'm sure there's a cool way to use a native function to decode the special characters as the stream is being read (I was hoping it could be done on the InputStreamReader layer). But how?