As you can see in my demo in the other answer is Encode using "\x{FFFD}" to decode the broken character. When it's reliable° in doing so, this could lead to better code.
Well, to be purist about it (emphasis mine):
If CHECK is 0, encoding and decoding replace any malformed character with a substitution character.
So it doesn't allow you to differentiate between a character that was broken by the read, and an actually malformed input file.
Update:
Not sure what other multi-byte encodings are out there...
Me neither, but I think UTF-8 and UTF-16 would already cover a lot of what's out there today.
As you can see in my demo in the other answer
I don't use the debugger often, so reading its output doesn't come naturally to me ;-)
In reply to Re^3: Processing an encoded file backwards
by haukex
in thread Processing an encoded file backwards
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |