I'm afraid this is the behavior for Jython 2.1. Jython 2.2 should
behave better, as long as the strings are initialized as type
unicode. So, in 2.1 u"abc" would translate to "abc", now in 2.2
u"abc" stays u"abc".
The reason for this odd behavior is: in Jython *all* strings are
represented by unicode strings internally, and the Python unicode
support is just a compatibility wrapper. In 2.1 this wrapper
merely consists of a check for characters values > 255 in the
string. In 2.2 there is a separate PyUnicode type that
(hopefully) provides better compatibility.
Some day (at least according to
) Python will come around to a
more jythony point of view :) and this problem should go away.
Then again, the time-frame for Python3000 is somewhat undefined last I
heard (much less the time-frame for a presumed Jython3000).