You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: