Quote:
Originally Posted by bassmadrigal
Are you suggesting that he revert the UTF8 support in -current?
|
Either this or by providing an UTF-8 aware default editor. The problem is not the UTF-8 support itself, but the default locale and other issues like the character set of the configuration files (is the character set of the configuration files officially defined in Slackware?)
I will try to explain the issue: it is a
bug and can lead to
corruption of system configuration files.
As an example, imagine a line in
/etc/passwd containing non ASCII characters in UTF-8:
Code:
jerome:x:500:100:Jérôme:/home/jerome:/bin/bash
If you open
/etc/passwd using Elvis and a non UTF-8 aware terminal emulator like xterm, the result might not be pretty, but is
safe to edit as long as you do not change the accented characters:
Code:
jerome:x:500:100:Jérôme:/home/jerome:/bin/bash
Now, if you use an UTF-8 aware terminal emulator like urxvt (rxvt-unicode) in combination with Elvis, things become
very dangerous. The accented characters are properly presented (thanks to the terminal emulator), but Elvis does not know that 2 bytes can be presented as one single character. At the beginning the file looks perfectly fine in Elvis:
Code:
jerome:x:500:100:Jérôme:/home/jerome:/bin/bash
You can move the cursor to the beginning of the string
/bin/bash and change it to
/bin/zsh. Again, the result looks fine:
Code:
jerome:x:500:100:Jérôme:/home/jerome:/bin/zsh
But if you save the file and reopen it, you suddenly have this:
Code:
jerome:x:500:100:Jérôme:/home/jerom/bin/zsh
You now have a
corrupted configuration file, which does not even contain the
correct number of fields! This can not happen in non UTF-8 aware GUI editors or in Windows. It can only happen on the CLI using an UTF-8 aware terminal emulator like urxvt in combination with an editor like Elvis.
Note that this is a constructive suggestion for improving Slackware, I personally can live with it, I even regularly use Elvis in UTF-8 based environments, but I know what I am doing! But it should not be the default in a well tested distribution, which may be used by Newbies.
I also do not want to hear that "I use it wrong", that I should not edit
/etc/passwd directly, or that I should use chsh to change the shell. I know all this, it is only provided as an example of a problem.