Q:

How to check if all characters in a file is present in a specific encoding?

I do have a UTF-8 file that I would like to convert to ISO 8859-9 and CP1254 (Turkish encodings) respectively. However I am unable to save the files in these encodings (I've tried various software). I suspect that in those files there are characters which are not present in these encodings (although visually everything checks out). How can I check that the characters inside these files are fine?
If I need to write a script or something like that, which path should I take?

A:

you can try to convert every char from utf-8 file to ISO 8859-9 and CP1254. If there is error or "empty" result(according to library encoding documentation) this char is absent.

