When the encoding is set to iso-8859-1, the file can't possibly contain characters that aren't part of the iso-8859-1 character set (unless they are encoded using entities such as ਩).
Are you asking if it's possible to detect if the wrong encoding is specified? There's no way to detect whether it's invalid or not without using heuristics. For example, if byte sequence in the XML would form a word in iso-8859-7 but not in iso-8859-1, it could suggest that the wrong encoding was specified.
In reply to Re: Detect wrong characters
by ikegami
in thread Detect wrong characters
by LexPl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |