StringEncodings.jl icon indicating copy to clipboard operation
StringEncodings.jl copied to clipboard

Detect non-convertible characters

Open roland-KA opened this issue 9 months ago • 0 comments

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?

roland-KA avatar Oct 28 '23 10:10 roland-KA