Issue2424

classification
Title: Converting to Jython a Python 3.5 project - coding error
Type: crash Severity: major
Components: Library Versions: Jython 2.7
Milestone:
process
Status: pending Resolution: duplicate
Dependencies: Superseder: Support isolated surrogate codepoints in unicode with UCS4 encoding
View: 2340
Assigned To: Nosy List: dani_kase, jeff.allen
Priority: normal Keywords:

Created on 2015-11-10.19:49:43 by dani_kase, last changed 2018-03-15.07:36:33 by jeff.allen.

Messages
msg10451 (view) Author: Daniel Kaminski de Souza (dani_kase) Date: 2015-11-10.19:49:42
It was asked at Stackoverflow.
There some trolls marked my posting  negative.
It is actually a real engineering problem being faced right now.
Can you guys help me with it?

http://stackoverflow.com/questions/33631652/converting-to-jython-a-python-3-5-project-coding-error

Best Regards,
Daniel
msg10452 (view) Author: Daniel Kaminski de Souza (dani_kase) Date: 2015-11-10.19:54:43
The severity was changed to critical because many people are utilizing already the latest Python modules and interpreter. And they might want to add Java functionality to their code. So they would basically have to backport it to Python 2.7 then to Jython 2.7 subsequentely.
msg11796 (view) Author: Jeff Allen (jeff.allen) Date: 2018-03-14.09:08:07
The code in the SO post:
 FS_ENCODING = 'ascii'; fn = b('[abc\xff]'); encoded = u('[abc\udcff]')
appears to be testing/expecting that the invalid ascii character '\xff' will be encoded into the invalid unicode string '\udcff'. This is used in CPython to byte-smuggle non-ascii file names through unicode strings.

Jython approaches differently. Versions after 2.7.0 may be able to treat this code more gently.

A much fuller consideration is given in #2340, #2342. Maybe allow one/both of these to supersede this ticket?
History
Date User Action Args
2018-03-15 07:36:33jeff.allensetsuperseder: Raw strings get different exception for lone surrogates -> Support isolated surrogate codepoints in unicode with UCS4 encoding
2018-03-14 09:08:07jeff.allensetstatus: open -> pending
severity: critical -> major
nosy: + jeff.allen
messages: + msg11796
priority: normal
superseder: Raw strings get different exception for lone surrogates
resolution: duplicate
2015-11-10 19:54:44dani_kasesetmessages: + msg10452
2015-11-10 19:52:33dani_kasesetseverity: major -> critical
2015-11-10 19:49:43dani_kasecreate