ini-parser icon indicating copy to clipboard operation
ini-parser copied to clipboard

Encoding Problem

Open DevMyReport opened this issue 5 years ago • 1 comments

Datarun.zip

Hello, When I use ini-parser on a .ini file containing "Démo" in value of a section, it returns me to "?" instead of the normally expected "é"

file (in attachment): [Section] value=Démo

Can i specify the encoding mode ? Than

ks for you help

DevMyReport avatar May 04 '20 14:05 DevMyReport

The function ReadFile can take a second parameter for encoding.
I tried your file with "iso-8859-1", which is western europe like this:

IniData data = parser.ReadFile("Datarun.ini", Encoding.GetEncoding(28591));

That gives back the right characters.
You could encode your ini-files as UTF-8 as well and use Encoding.UTF8.

warnat avatar May 06 '20 05:05 warnat