Discussion Board
Go to the previous messageThere are no next messages
Current Forum: Homework 4 - Lempel Ziv (Part 2)
Date: Tue Oct 23 2001 9:19 pm
Author: Bortz, Andrew S. <abortz@andrew.cmu.edu>
Subject: Re: Ascii values 128-159 -> "?" -- Seems to be a windows problem...

The reason that it doesn't work properly on Windows is because the default String encoding doesn't seem to have characters for 128-159. When writing a String to the file, you generally do writer.writeBytes(myString.getBytes()), but this turns 128-159 into '?'s.

The solution is to instead write writer.writeBytes(myString.getBytes("ISO-8859-1")). This seems to fix all the problems.
Post response

Go to the previous messageThere are no next messages
Current Thread Detail:
Ascii values 128-159 -> "?"      Tomes, Justin Daniel      Mon Oct 22 2001 10:14 pm       
Re: Ascii values 128-159 -> "?"      Dozzi, Giancarlo      Mon Oct 22 2001 10:31 pm       
Re: Ascii values 128-159 -> "?" -- ...      Dozzi, Giancarlo      Mon Oct 22 2001 10:38 pm       
Re: Ascii values 128-159 -> "?" ...      Tomes, Justin Daniel      Mon Oct 22 2001 11:28 pm       
Re: Ascii values 128-159 -> "...      Bortz, Andrew S.      Tue Oct 23 2001 9:19 pm       

Back to previous screen