Gude Reshma wrote:
>   byte[] byte_array_of_string = str.getBytes();

Never use the zero parameter "getBytes" method because it will
return the bytes in the system's default locale, which may not
be able to encode the characters in your file. 

Instead, use the "getBytes(String)" variety so that you can 
specify the encoding of the bytes that are returned. (Also 
remember that you should match the encoding with what is 
declared in the XMLDecl line -- <?xml version='1.0' 
encoding='...'?>.)

Or better yet, use a StringReader instead. Then you don't have
to worry about matching the encoding specified in the XMLDecl.

-- 
Andy Clark * [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to