A colleague was using Qt's built-in QTextStream class to rewrite the /etc/network/interfaces file on an Ubuntu system. Part of that code included a call to QTextStream's setCodec() method, where the codec was set to UTF-8. (see https://doc.qt.io/qt-5/qtextstream.html#setCodec if you're curious)
This got me wondering about what the Linux configuration files are SUPPOSED to be written as. It seems like ISO 8859-1 would be the closest to what I'd consider "plain ASCII" style of text, and I would (perhaps naively) assume this to be correct since most configurations files are plain English with no need for much more than the basic alphabet, numbers and a few punctuation signs.
But then I also wonder what would someone from a non-English speaking country do if they wanted to put comments into such files using other characters that aren't in ISO-8859-. Are they just plain "out of luck" ?
There are obviously a lot of "standard" configuration files that you'd find on an Ubuntu/Linux system, e.g.
Would anyone care to weigh in on what encoding is actually supported/expected in these sort of files ? And where this is actually documented ? Is it enshrined in some sort of "Linux developers manifesto" as something writers of new Linux system services should be following, and if so, where would I find a definitive source of that information ?