poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morten <li...@kikobu.com>
Subject Platform dependent encoding (problems running on linux)
Date Mon, 03 Nov 2003 13:41:27 GMT

Hi. I've been developing an application for extracting data
from Excel documents and inserting into a DB. When the application
runs on windows, it works fine. Just now, I've moved to to Linux,
and this appears to break the encoding. I'm curious if anyone
here has had similar experiences.

The string value in the below, is from SSTRecord.getString(int i);
The UTB-8 byte[] is a byte-per-byte dump of the byte[] obtained
by SSTRecord.getString(int i).getBytes("UTF-8");

Log from windows:

14:32:33.213 03/11/2003 DEBUG: Processing record (31,1): Leer más
14:32:33.213 03/11/2003 DEBUG:   - deflt byte[]: 
76,101,101,114,32,109,-31,115
14:32:33.213 03/11/2003 DEBUG:   - UTF8  byte[]: 
76,101,101,114,32,109,-61,-95,115
14:32:33.213 03/11/2003 DEBUG:   - UTF16 byte[]: 
-2,-1,0,76,0,101,0,101,0,114,0,32,0,109,0,-31,0,115

Log from linux:

14:32:15.861 03/11/2003 DEBUG: Processing record (31,1): Leer m�
14:32:15.861 03/11/2003 DEBUG:   - deflt byte[]: 
76,101,101,114,32,109,-17,-65,-67
14:32:15.861 03/11/2003 DEBUG:   - UTF8  byte[]: 
76,101,101,114,32,109,-17,-65,-67
14:32:15.861 03/11/2003 DEBUG:   - UTF16 byte[]: 
-2,-1,0,76,0,101,0,101,0,114,0,32,0,109,-1,-3

As you can see, the byte[]'s are different from platform to platform. :-|

Any tips greatly appreciated.

Thanks,

Morten




---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Mime
View raw message