Java does not support Unicode, Python does

Welcome to the news archive. Here you'll find all the news items, ordered by date. You can use the links below to read other news items, or go back to the archive overview.

« Previous: Pong Next: Hacking in Fallout 3 »

2008-11-03 04:41 - Java does not support Unicode, Python does

Sometimes Java just amazes me. As a friend of mine posted, Java does not support Unicode. Of course, my favourite language Python has a much friendlier approach to Unicode:

  >>> s = '⿱𠂉乙'.decode('utf-8')
>>> s
u'\u2ff1\U00020089\u4e59'
>>> s[1]
u'\U00020089'
>>> print s[1]
𠂉

Perhaps,. people will some day start to understand that statically typed languages are not a guarantee of a bug-free application. In the end, it's more important that a language does what it is supposed to do.

Post a comment


Comments

There are no comments on Java does not support Unicode, Python does yet. Use the form below and be the first!

Post a comment

Use Restructured Text to markup the comment. The link opens in a new window.


All fields are required, except when otherwise noted. You can use a limited subset of Restructured Text to markup the comment.

It might take up to five minutes for your comment to show up, due to caching of the pages.