This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2007年11月19日 09:29 by arnimar, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| utf7.py | arnimar, 2007年11月19日 09:29 | |||
| test | arnimar, 2007年11月19日 09:29 | |||
| Messages (3) | |||
|---|---|---|---|
| msg57629 - (view) | Author: Árni Már Jónsson (arnimar) | Date: 2007年11月19日 09:29 | |
There is a utf-7 decoding error when decoding strings which have a shift sequence at a certain place. To reproduce run the attached program on a file containing the string: "0123456789012345678901234567890123456789012345678901234567890123456789X+-". The shift sequence starts at character 72. The culprit seems to be in codecs.py: StreamReader.read. The input is split on the 72 character boundary, and the first decode call raises an exception since the shift sequence is not terminated. The second one falls back 1 character, raises no exception, but the previous exception is raised since there is no newline in the output (?). The lines I don't understand are, and are the ones raising the exception. if len(lines)<=1: raise |
|||
| msg57630 - (view) | Author: Árni Már Jónsson (arnimar) | Date: 2007年11月19日 09:29 | |
Added a test file. |
|||
| msg57722 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2007年11月21日 01:10 | |
The utf-7 incremental decoder was indeed losing its state between two chunks of data. Corrected as r59076. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:28 | admin | set | github: 45801 |
| 2007年11月21日 01:10:13 | amaury.forgeotdarc | set | status: open -> closed resolution: fixed messages: + msg57722 nosy: + amaury.forgeotdarc |
| 2007年11月19日 09:29:44 | arnimar | set | files:
+ test messages: + msg57630 |
| 2007年11月19日 09:29:18 | arnimar | create | |