Skip to content

gh-160717: Make euc_kr decoding round-trip for KS X 1001 syllables - #160718

Open
StanFromIreland wants to merge 4 commits into
python:mainfrom
StanFromIreland:euc_kr-rnd-trip
Open

StanFromIreland wants to merge 4 commits into
python:mainfrom
StanFromIreland:euc_kr-rnd-trip

Conversation

@StanFromIreland

@StanFromIreland StanFromIreland commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

@StanFromIreland

Copy link
Copy Markdown
Member Author

@corona10 is it ok to merge the patch, I can wait a little longer if you'd like to review?

@corona10

Copy link
Copy Markdown
Member

Still concern with old documentation that were not generated by Python. EUC-KR is still standard in banking system, but betting low possibility in actual regression in practice.

@StanFromIreland

StanFromIreland commented Oct 27, 2026 •

Copy link
Copy Markdown
Member Author

Unfortunately I don't see a way around this. We could leave the codec alone and make tarfile's path check operate on bytes. That isn't ideal in itself, and it only fixes tarfile, os.fsdecode() followed by os.fsencode() would still return different bytes on EUC-KR hosts, so os.path.realpath(), pathlib.Path.resolve(), shutil and any other str-based path check keep the same flaw. I agree the regression risk isn't zero, but it looks small, I think a potential path-escape vulnerability (which could affect those banking systems you noted) has to outweigh some breakage for a rare input.

But, I'm not all that familiar here, so maybe you have a different solution in mind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants