Here is the program: http://codepad.org/eyxunHot
The encoding of the file is UTF-8.
I have a text file named "config.ini" with the following word in it: ➑ball
If I use notepad to save the file with "UTF-8" encoding, then run the program, according to the debugger the value of eight_ball is: âball
If I use notepad to save the file with "Unicode" encoding, then run the program, according to the debugger the value of eight_ball is: ÿþ'b
If I use notepad to save the file with "Unicode big endian" encoding, then run the program, according to the debugger the value of eight_ball is: þÿ'
In all these cases the result is incorrect. Also ANSI encoding doesn't support the ➑ symbol. How do I make sure that the word ➑ball will be extracted from the file when I go config_file >> eight_ball, regardless of encoding? I want the output of this program to be "Program is correct" regardless of the encoding of config.ini.