Character Sets - Receiving the wrong characters
From Open CSTA
There's a page on character encoding that was written a long time ago that explained it all. Recently, I found this page which says it all in quite simple terms: http://www.cs.rpi.edu/academics/courses/netprog/c09.html about half way down.
To read and write characters, you need the classes Reader and Writer. There is a class InputStreamReader which converts an input stream (bytes) to a reader (chars). A charset is named mapping between sequences of sixteen-bit Unicode code unites and sequences of bytes.... If you dont specify the charset when you create a reader, it uses the default, which on most systems is <charset - usually UTF-8 in my experience>.
Set your encoding to ISO-8859-1 and you'll get the right characters. For example:
in = new InputStreamReader( client.getInputStream(), "ISO-8859-1" ) ;
I remembered the 8859 part of it once when doing some work for a customer and I kept receiving the wrong data. The 8859 triggered a flashback when I originally wrote PBX connections with serial ports, and in those days, just left System.out.println messages at start up telling the application operator that the default encoding for the application was changing.