encoding convertfrom -strict ascii \x7f generates exception
Closed / Fixed4bea02e8113051c3241a414849163b83e74d36e8Created 4 years agoUpdated 4 years ago
Descriptionmarkdown2023-02-20 13:03:10
% encoding convertfrom -strict ascii \x7f
unexpected byte sequence starting at index 0: '\x7F'
Stepping through the code, the encoding table for ascii maps 0x7F to 0. I haven't looked at how these tables are loaded / generated. Will later if someone already familiar does not.
/Ashok
Referenced by4
afc62c3848Merge trunk [69fba9fb6b]: Fix [4bea02e811]: encoding convertfrom -strict ascii \x7f generates exception Many other encodings had the same problem, and also the reverse happened: encodings which should throw an exception with -strict but didn't (within range 0x80-0x9F). check-in2023-04-16 16:40:3784d5dcc42aMerge trunk: Fix [4bea02e811]: encoding convertfrom -strict ascii \x7f generates exception Many other encodings had the same problem, and also the reverse happened: encodings which should throw an exception with -strict but didn't (within range 0x80-0x9F). check-in2023-03-22 13:01:17c86a644db8Fix [4bea02e811]: encoding convertfrom -strict ascii \x7f generates exception Many other encodings had the same problem, and also the reverse happened: encodings which should throw an exception with -strict but didn't (within range 0x80-0x9F) check-in2023-02-23 11:00:4810971c2d97Proposed fix for [4bea02e811]: encoding convertfrom -strict ascii \x7f generates exception check-in2023-02-20 20:41:00
jan.nijtmanswiki2023-02-20 20:42:27
Good catch!
> Will later if someone already familiar does not.
Well, I happen to be familiar. More examples:
% encoding convertfrom -strict tis-620 \x7f unexpected byte sequence starting at index 0: '\x7F'
But also the other way around, which should throw an exception but currently don't (many cp* encodings):
% encoding convertfrom -strict cp1252 \x81
Proposed fix [here]
jan.nijtmanswiki2023-02-23 11:05:42
Fixed [here]
Thanks for the report!
Log in (anonymous is fine) to add a comment.