Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect non-convertible characters #57

Open
roland-KA opened this issue Oct 28, 2023 · 0 comments
Open

Detect non-convertible characters #57

roland-KA opened this issue Oct 28, 2023 · 0 comments

Comments

@roland-KA
Copy link

I have to convert text files from an UTF-encoding to a ISO-8859-1-encoding. In this case not all characters can be converted to the target encoding. So, whenever encode encounters a non-convertible character within a string, it raises an exception.

Having an exception raised in this situation is in my use case not really a good solution.

Is there a way to sort of "test" a string in advance, if it contains non-convertible characters and also identify which of the characters within the string are non-convertible?

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

No branches or pull requests

1 participant