It seems that some characters aren’t well appreciated when parsing such a file. I have a phrase using a “!” that I want to retrieve and it triggers an error.
Is there a way toa void that? Are XML files the only alternative to .ini?
Btw, I am trying to store a few text strings that I don’t want to have in a db.
Note: There are reserved words which must not be used as keys for ini files. These include: null, yes, no, true, and false. Values null, no and false results in “”, yes and true results in “1”. Characters {}|&~![()" must not be used anywhere in the key and have a special meaning in the value.
It seems like you can’t have the “!” character.
You can escape this by wrapping your string in double quotes, such as :
Is there a way of using “ON” as a left-hand argument in an ini file?
This is a code for Ontario, Canada.
AB = Alberta
BC = “British Columbia”
MB = Manitoba
NB = “New Brunswick”
NL = “Newfoundland and Labrador”
NT = “Northwest Territories”
NS = “Nova Scotia”
NU = Nunavut ON = Ontario
PE = “Prince Edward Island”
QC = Quebec
SK = Saskatchewan
YT = Yukon