I'm writing a program which needs to take user input to know how to map characters in the sense the user needs to specify something like "a=>b" (a maps to b). There could be quiet a few of these "mappings" (e.g. 10+). I'm planning on using a file that the user can edit. After the initial setup the user will probably not change the settings often. The user is an IT employee so they should be technically incline.
My question is
1)what file format should be used? .txt, .dat, .ini etc.? I want the user to be able to modify this with a text editor such as Notepad.
2)what format should the file contain? Does it make sense "a" => "b" or is there a better conversion or is it really up to me?
It's all up to you. We often use key=value
, for what it's worth.
As for the "file format" keep in mind that whatever file extension you use, if it's text then it's just text even if you call it a .jpg
. Using a sane extension won't do any harm though, .ini
or .conf
are quite common.