Inconsistent linux console font encoding with and without enabling consolefont service
The default encoding for the linux console in a fresh installation of alpine linux appears to be unicode. However, when I enable the consolefont service the encoding switches to ASCII. To correct for this I need to add unicode="YES" in /etc/rc.conf.
To reproduce, after a new installation:
-
boot and login (as root)
-
apk add terminus-font
-
set consolefont="ter-v32n.psf.gz" in /etc/init.d/consolefont:
-
rc-service consolefont start
-
set unicode="YES" in /etc/rc.conf
-
rc-service consolefont restart
Running kbd_mode after (0) will return UNICODE. Running it after (3) will return ASCII. After (5) it will return UNICODE.
This is because the consolefont service depends on the termencoding service which is the one that uses the unicode variable.
I find it surprising that setting the consolefont changes the encoding, because this is not the same as if I did setfont.
I suggest that the default encoding is whatever is set in /etc/rc.conf, regardless of whether the consolefont service is started or not.