I'm trying to open an INI file on Mac OSX using TIniFile
:
SettingsFile := TIniFile.Create(aINIFileName); //Ini vertion
Try
iUpdateMaj := SettingsFile.ReadInteger('CurrentVersion', 'Maj', 0);
iUpdateMin := SettingsFile.ReadInteger('CurrentVersion', 'Min', 0);
iUpdateRel := SettingsFile.ReadInteger('CurrentVersion', 'Rel', 0);
Finally
SettingsFile.Free;
End;
The exact error I got is:
(EEncodingError) No mapping for the Unicode character exists in the target multi-byte code page.
This was working fine before in Yosemite, but since El Capitan it is no longer working.
From research I've done, the problem is related to Unicode endoding. I know that the INI file created with Notepad is encoded in UTF-8, and TIniFile
use TStrings
internally.
Does anyone have an idea how I can resolve this issue?