There is a known bug in notepad where occasionally files which open completely normally in notepad++, wordpad, etc, open as Chinese characters in notepad.
Copy pasting the contents of the file (from notepad++ to a fresh document) will still produce Chinese characters in notepad. Changing the file name will still produce Chinese characters in notepad. Forcibly changing the encoding has no effect.
Inserting or removing a single character (in notepad++) does fix the problem (until the change is reversed, and then the problem returns), however we are not aware of a way to know in advance which files would benefit from the insertion of an extraneous space, versus files where the insertion of the space would itself trigger the bug.
We would like to ensure that the files we create and save do not trigger this bug. The method must be compatible with Windows and Linux machines.
Has anyone else encountered this and found a reliable way of preventing triggering the bug?
(note: the file in question, when examined in a binary editor, contains only ASCII characters, nothing else. this is not binary data slipping in)