IniFiles working incorrectly...
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
IniFile values are returned incorrectly.
Under Delphi, if you have an Inifile that contains the following name-value pair...
Message0="Are you sure you want to quit the game?"
When you ask for the value of Message0 it returns..
Are you sure you want to quit the game?
While with FreePascal, if you ask for the value of Message0 it returns...
"Are you sure you want to quit the game?"
Note that this string is surrounded by double quotes. This is incorrect, at least under Windows.
Looking through the Delphi TIniFile class it makes use of the GetPrivateProfileString and WritePrivateProfileString Windows API calls, which appear to strip the double quotes if they exist, before returning the value. I would suggest that FreePascal also strip the double quotes so that there is some consistency.
Additional information:
Reporter: Dominique Louis
EMail: Dominique at SavageSoftware dot com dot au
Mantis conversion info:
- Mantis ID: 5966
- OS: All
- Version: 1.9.9
- Fixed in version: 2.0.2