Here is the program: http://codepad.org/eyxunHot
File Encoding - UTF-8.
I have a text file called "config.ini" with the following word: ➑ball
If I use notepad to save a file encoded with "UTF-8", then run the program, according to the debugger, the value is eight_ball: ï "¿âball
If I use notepad to save the file with the "Unicode" encoding, then run the program, according to the debugger, the value is eight_ball: ÿþ'b
If I use notepad to save the file with the Unicode Big End encoding, then run the program, according to the debugger, the value is eight_ball: Thy
In all these cases, the result is incorrect. ANSI encoding also does not support the character .. How can I make sure that the word ➑ball will be extracted from the file when I go config_file → eight_ball, regardless of the encoding? I want the output of this program to be "Program is correct" regardless of the encoding config.ini.
source
share