This message is generated when loading the indicated file does not give a valid character encoding. A file is loaded as a character encoding file when the name of the file is assigned as the value of $CharacterEncoding.
This message will normally be generated only if you have added or edited a character encoding file. This message could also be generated if the indicated file is corrupted.
Character encoding files can be found in the SystemFiles/CharacterEncodings directory in your copy of the Wolfram System.
Off[message] switches off the message; On[message] switches it on. For example: Off[$CharacterEncoding::charfile].