poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Stampoultzis <gst...@iinet.net.au>
Subject Re: String encoding (again)
Date Wed, 24 Aug 2005 20:53:14 GMT

Aren't Java strings always stored as 2 byte unicode as defined by the spec?

acoliver@apache.org wrote:

> Not all systems default to unicode.  Though that looks doofy to me. 
> Your code assumes they do.  You'd need a flag saying "amIOnAnAS400()" 
> or something ;-)
>
> -Andy
>
> Jason Height wrote:
>
>> All,
>>
>> Any idea why the following line from UnicodeRecord (current HEAD rev 
>> and previous) is actually required?
>> String unicodeString = new 
>> String(getString().getBytes("Unicode"),"Unicode");
>>
>> If i remove it and use:
>> String unicodeString = getString();
>>
>> 1) All of the unit tests still pass, and
>> 2) There is a 33x performance improvement with workbooks containing a 
>> large numbers of strings
>>
>> I am tempted to apply a patch to use my approach. Any objections?
>>
>> Jason
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
>> Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
>> The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Mime
View raw message