Skip to content

Conversation

@StanFromIreland
Copy link
Contributor

No description provided.

@StanFromIreland StanFromIreland marked this pull request as ready for review November 2, 2025 15:08
@StanFromIreland StanFromIreland changed the title Improve transliteration patch Fix case when undecodable characters are encountered on Windows Nov 2, 2025
else:
raise ValueError("unsupported error handling")
return outres.decode() + out1, inlen + len1 + 1
raise
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistent with encode implementation, I assume this was an oversight.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should definitely always return a tuple or raise an error.

@bodograumann
Copy link
Owner

Just silently returning a partially converted result seems dangerous. Can we use the same error handling as with code == errno.EILSEQ here?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants