The default encoding for RH 8.0 is UTF-8 where for RH 7.3 its 8859-1 I'm curious as to why..?
On Sun, 2002-11-03 at 17:42, Andrew C. Oliver wrote: > After upgrading to Redhat 8.0 I have a number of unit tests failing (you > can see this by checking out jakarta-poi from Apache per instructions > here http://jakarta.apache.org/site/cvsindex.html and running "cd > jakarta-poi;export CLASSPATH=;./build.sh clean compile test" or run the > "site" target to see the stack trace/all failed unit tests in a nifty > html report under build/docs/tests/junit). It appears that they are all > centered around java.lang.String behaving differently. Could this be a > result of the default encoding changing between 7.3 and 8.0? If > so...from what to what? > > Here is an example of something that has changed: > > > >http://cvs.apache.org/viewcvs.cgi/jakarta-poi/src/testcases/org/apache/poi/util/TestStringUtil.java?rev=1.5&content-type=text/vnd.viewcvs-markup > public void testPutCompressedUnicode() > { > byte[] output = new byte[ 100 ]; > byte[] expected_output = > { > ( byte ) 'H', ( byte ) 'e', ( byte ) 'l', ( byte ) 'l', > ( byte ) 'o', ( byte ) ' ', ( byte ) 'W', ( byte ) 'o', > ( byte ) 'r', ( byte ) 'l', ( byte ) 'd', ( byte ) 0xAE > }; > String input = new String(expected_output); > > StringUtil.putCompressedUnicode(input, output, 0); > for (int j = 0; j < expected_output.length; j++) > { > assertEquals("testing offset " + j, expected_output[ j ], > output[ j ]); > } > StringUtil.putCompressedUnicode(input, output, > 100 - expected_output.length); > for (int j = 0; j < expected_output.length; j++) > { > assertEquals("testing offset " + j, expected_output[ j ], > output[ 100 + j - expected_output.length ]); > } > try > { > StringUtil.putCompressedUnicode(input, output, > 101 - > expected_output.length); > fail("Should have caught ArrayIndexOutOfBoundsException"); > } > catch (ArrayIndexOutOfBoundsException ignored) > { > > // as expected > } > } > > The problem is that upon construction of the string, the last byte 0xAE > is dropped. > > There are other string based unit tests that fail but this is the most > clear cut. (The others I'm not yet sure why they are failing) > > So all of these unit tests are currently running fine (all things being > equal) on Redhat 7.3! In fact the nightly build runs on my > yet-to-be-upgraded webserver. > > Now this is all under JDK 1.4.x -- Java 1.3.1x doesn't even run! > > Java 1.3.1 just does this: > > [andy@localhost jakarta-poi]$ ./build.sh clean compile > <snip> > > compile: > Compiling project core with Java 1.3, debug on, optimize off, > deprecation on > Compiling 285 source files to > /mnt/u03/home/andyext/jakarta/2/jakarta-poi/build/classes > error: compiler message file broken: > key=compiler.err.sun.io.MalformedInputException arguments=null, null, > null, null, null, null, null > >/mnt/u03/home/andyext/jakarta/2/jakarta-poi/build/java/org/apache/poi/hssf/record/MulRKRecord.java:66: > org.apache.poi.hssf.util.RKUtil is not public in org.apache.poi.hssf.util; cannot be >accessed from outside package > import org.apache.poi.hssf.util.RKUtil; > ^ > >/mnt/u03/home/andyext/jakarta/2/jakarta-poi/build/java/org/apache/poi/hssf/record/RKRecord.java:59: > org.apache.poi.hssf.util.RKUtil is not public in org.apache.poi.hssf.util; cannot be >accessed from outside package > import org.apache.poi.hssf.util.RKUtil; > ^ > >/mnt/u03/home/andyext/jakarta/2/jakarta-poi/build/java/org/apache/poi/hssf/record/MulRKRecord.java:172: > org.apache.poi.hssf.util.RKUtil is not public in org.apache.poi.hssf.util; cannot be >accessed from outside package > return RKUtil.decodeNumber((( RkRec ) > field_3_rks.get(coffset)).rk); > > <snip/> > > Notice the peculiar message about the compiler message file being > broken. Now the odd thing is the RKUtil is public and accessible > outside the package (and again, it still works from jdk 1.3.1x under RH > 7.3). > > So I guess aside from this being just obvious to someone as to why > something like this would happen between RH 7.3->8.0.. my question is > "has the default system encoding changed" -- "where would I find it" and > what did it change from -> to? > > Your help is greatly appreciated. > > -Andy > -- > http://www.superlinksoftware.com - software solutions for business > http://jakarta.apache.org/poi - Excel/Word/OLE 2 Compound Document in > Java > http://krysalis.sourceforge.net/centipede - the best build/project > structure > a guy/gal could have! - Make Ant simple on complex Projects! > The avalanche has already started. It is too late for the pebbles to > vote. > -Ambassador Kosh > > > > -- > redhat-list mailing list > unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe > https://listman.redhat.com/mailman/listinfo/redhat-list -- http://www.superlinksoftware.com - software solutions for business http://jakarta.apache.org/poi - Excel/Word/OLE 2 Compound Document in Java http://krysalis.sourceforge.net/centipede - the best build/project structure a guy/gal could have! - Make Ant simple on complex Projects! The avalanche has already started. It is too late for the pebbles to vote. -Ambassador Kosh -- redhat-list mailing list unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list