Answer the question
In order to leave comments, you need to log in
How to read from ini to UTF-8 in C#?
Reading method:
[DllImport("kernel32", CharSet = CharSet.Unicode)]
static extern int GetPrivateProfileStringW(string Section, string Key, string Default, StringBuilder RetVal, int Size, string FilePath);
public string ReadINI(string Section, string Key)
{
var RetVal = new StringBuilder(255);
GetPrivateProfileStringW(Section, Key, "", RetVal, 255, Path);
return RetVal.ToString();
}
String str = INI.ReadINI("Settings", "Lan");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question