Am 17.08.19 um 15:07 schrieb Georgios Petasis:
There is no way to ask the encoding system to throw an error on unknown
characters instead of converting it to the "unknown character"
character. The only way seems to be, that you convert it back and check
if it is identical, like this:
set roundtrip [encoding convertfrom iso8859-7 [encoding convertto
iso8859-7 input]]
if {$roundtrip ne $input} { error Loss! }
Unfortunately, there are still situations where an error is shown even
if the character existed; because you can compose accented letters in
Unicode by either accent + basechar or use a precombined letter (one of
the stupidest decisions in Unicode). This can only be checked by Unicode
normalizations, which is not part of the Tcl built-in commands.
Christian