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. |
|