Message8077

Author omatz
Recipients omatz
Date 2013-07-31.10:04:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375265066.51.0.888120229611.issue2073@psf.upfronthosting.co.za>
In-reply-to
Content
strval = "schön"
hexval = ':'.join(x.encode('hex') for x in strval)
print hexval

correctly outputs: 73:63:68:c3:b6:6e
so the german o-umlaut (unicode \u00fc) is correctly converted to the utf-8 byte sequence "c3 b6"

It should be possible to configure jython in such a way that if I pass strval to a Java-Method, then the str is correctly converted back to "schön".

However, jython invokes the Java-method with the 6-character string value "schön", i.e., the o-umlaut has been replaced by the two characters \u00c3 \u00b6.
History
Date User Action Args
2013-07-31 10:04:26omatzsetrecipients: + omatz
2013-07-31 10:04:26omatzsetmessageid: <1375265066.51.0.888120229611.issue2073@psf.upfronthosting.co.za>
2013-07-31 10:04:26omatzlinkissue2073 messages
2013-07-31 10:04:25omatzcreate