FS#25599 - [initscripts] fsck output encoding broken when DAEMON_LOCALE is set to "yes"
Attached to Project:
Arch Linux
Opened by mkkot (mkkot) - Tuesday, 16 August 2011, 08:50 GMT
Last edited by Tom Gundersen (tomegun) - Wednesday, 02 May 2012, 22:14 GMT
Opened by mkkot (mkkot) - Tuesday, 16 August 2011, 08:50 GMT
Last edited by Tom Gundersen (tomegun) - Wednesday, 02 May 2012, 22:14 GMT
|
Details
Description:
Since you introduced DAEMON_LOCALE in /etc/rc.conf, I set it to ="yes". Now, when starting system, I can observe such strange behaviour: Udev starts, then fsck checks filesystems, says they are clean, boot process continues. Checking filesystems is problably done by /etc/rc.d/functions: # Check local filesystems fsck_all() { fsck -A -T -C"$FSCK_FD" -a -t "no${NETFS//,/,no},noopts=_netdev" $FORCEFSCK Fsck output is displayed as it supposed to be, translated, with national characters. Then, probably when next function from /etc/rc.d/functions is called, character encoding from fsck gets broken: # Function for setting console font if required set_consolefont() ... You can see the effect here: http://vimeo.com/27761144 (when it gets converted) or directly: http://www.linux-porady.multimo.pl/inne/video/IMG_0177.AVI As you can see "bloków" is changed to blok[some strange character]w My rc.conf: LOCALE="pl_PL.utf8" HARDWARECLOCK="UTC" TIMEZONE="Europe/Warsaw" KEYMAP="pl" CONSOLEFONT="lat2-16" CONSOLEMAP="8859-2" USECOLOR="yes" DAEMON_LOCALE="yes" |
This task depends upon
You can delete your CONOSELMAP from rc.conf, as that does not take effect in utf8 mode.
This issue can be reproduced by using the attached file, as follows:
# setfont
# cat font-test
# setfont lat2-16
I guess this issue could be solved by moving the font setting to happen before any localised messages are printed. I'll have to look into if that will cause any problems (if so it will be with a /usr partition).
(I even made some expansions on that page and wanted to check if CONSOLEMAP really has to be 8859-2. I left this untouched, probably had a good reason. I'll check it again tomorrow.)
Let me know what you find out (by the way, you can easily play around on any system using setfont and the file I provided. Calling "setfont" resets to the default, and then you can try calling it with a font and using -m you can also provide a consolemap).
http://www.linux-porady.multimo.pl/inne/IMG_0178.AVI
And that is how it looks directly after log in (this capture is unfortunately more blurry):
http://www.linux-porady.multimo.pl/inne/IMG_0180.AVI
This video shows your "óóó" file (which is UTF-8) displayed on tty with different setfont configurations. This command changes how fonts are displayed on console and generates wrong encoding on captions already written but in all cases it gives proper encoding when 'cat font-test' is called again. I'm wondering if this is due to CONSOLEMAP variable in rc.conf. Going to check this right now. Unfortunately I'm not sure how I should interpret what is happening so I need some guidance here.
// Edit: okay, I set it to 8859-2, then fsck checked my disk. Before that I removed lost+found folder, thinking it's not needed. So I saw some output about fsck modyfying filesystem and the encoding of those messages was wrong.
You need to rebuild the kernel image for the change to take effect.