Jython

Issue1015

classification
Title: unicode string combination with % behaves unexpectedly
Type: behaviour Severity: normal
Components: Core Versions: 2.5alpha1
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: amak, fwierzbicki, leosoto, seamus
Priority: Keywords:

Created on 2008年03月26日.22:31:32 by seamus, last changed 2008年09月13日.16:21:41 by leosoto.

Files
File name Uploaded Description Edit Remove
trouble4Jython.py seamus, 2008年03月26日.22:31:31 A simple test that fails w/jython. Works w/CPython
Messages
msg3106 (view) Author: seamus (seamus) Date: 2008年03月26日.22:31:31
Jython 2.2.1 on java1.6.0_03
the % operator for string concatenation behaves unexpectedly for unicode
strings. I suspect this is a bug.
 File "/tmp/trouble4Jython.py", line 20, in ?
UnicodeError: ascii decoding error: ordinal not in range(128)
msg3107 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2008年03月26日.23:31:56
This is an issue with the pep 263 support which is a 2.3 feature. The
prod version of Jython (2.2) will not support this, but future versions
will. I've set the version to 2.5alpha1 to reflect this.
msg3108 (view) Author: seamus (seamus) Date: 2008年03月27日.13:30:26
Even without the pep 263 feature,
unicode strings can be combined with '+' but not '%'.
def getAraLetters():
 return ''.join([unichr(num) for num in xrange(1569,1617)])
newString = u""" The Arabic Letters: """+ getAraLetters()
newString = u""" Here are some Arabic letters %s """ % (getAraLetters())
msg3113 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2008年04月01日.15:31:36
okay -- I've assigned this bug to myself, I'll take a look at the
behavior in 2.2.
msg3503 (view) Author: Leonardo Soto (leosoto) Date: 2008年09月13日.16:21:41
Both tests (trouble4Jython and the interactive session posted on the
last message) don't crash anymore on trunk.
History
Date User Action Args
2008年09月13日 16:21:41leosotosetstatus: open -> closed
nosy: + leosoto
resolution: fixed
messages: + msg3503
2008年04月18日 12:27:08amaksetnosy: + amak
2008年04月01日 15:31:36fwierzbickisetassignee: fwierzbicki
messages: + msg3113
2008年03月27日 13:30:27seamussetmessages: + msg3108
2008年03月26日 23:31:56fwierzbickisetmessages: + msg3107
versions: + 2.5alpha1, - Deferred
2008年03月26日 23:28:19fwierzbickisetnosy: + fwierzbicki
2008年03月26日 22:31:32seamuscreate

Supported by Python Software Foundation,
Powered by Roundup

AltStyle によって変換されたページ (->オリジナル) /