poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Height <jhei...@minotaur.apache.org>
Subject Re: String Encoding (again)
Date Wed, 24 Aug 2005 23:58:36 GMT
Andy,

So if i did an audit over the code and made sure that getBytes() is not 
called without specifying an encoding ie getBytes("UTF-16LE") then 
everything should be sweet.

UnicodeRecord does specifying an encoding when it is about to serialize 
the string bytes, so it shoud perform the translation from whatever the 
string default encoding is, into the required encoding.

Jason



http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#getBytes()

public byte[] getBytes()

      Encodes this String into a sequence of bytes using the platform's
default charset, storing the result into a new byte array.

      The behavior of this method when this string cannot be encoded in
the default charset is unspecified. The CharsetEncoder class should be
used when more control over the encoding process is required.

      Returns:
          The resultant byte array
      Since:
          JDK1.1


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