I don't think it will be a serious problem in practice.
Most encodings has only one representation for every character.
In most cases, we are safe. However, if the input is one of unicode encoding form, say UTF-8 NFC, we may have trouble. The output file may be different from the input file. Because any unicode-compliant application should be able to handle the different representation, so it should not be a big problem either. For people who do need to keep the binary representation, they can use some special code or library to do so.