ini
ini copied to clipboard
Parsing special characters, ex: # number signs
When parsing values like 6#G222 ini parser ignores all values after #. Values like this are used between multiple languages and needs to be able parse password values.
[db]
user = admin
password = 6#G222@!ds9DlA0492SlL82
I also facing this problem. I have a value like sed -i s/^\(server .*iburst\)/#\1/' /etc/ntp.conf. But the values after # is truncated. It will be really helpful if this is fixed are or if there is any workaround.
You need to quote # and ; - since they introduce comments. So the following works:
[db]
user = admin
password = 6\#G222@!ds9DlA0492SlL82
It's a little bit unexpected, because you normally don't have inline comments with ini files.