Message2001

Author cgroves
Recipients
Date 2007-11-25.19:47:19
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Each character in a Python str is a single byte, so its values can only range from 0-255.  String.getBytes("ISO-8859-1") is the fastest way to turn a java String into a byte[] of those values.  String.getBytes() uses the JVM's default charset to encode those values to bytes, so it can lead to incorrect byte values if that encoding does something odd with the values.  If you have a String with characters beyond 255 in it, you should use a unicode object, not a str.
History
Date User Action Args
2008-02-20 17:18:06adminlinkissue1818393 messages
2008-02-20 17:18:06admincreate