bootmisc update: setfont/consolechars codepage support added - please review

Kok, Auke sofar at foo-projects.org
Wed Mar 7 17:01:52 CET 2007


Zbigniew Luszpinski wrote:
> Hello,
> 
> it looks there is a little problem with fonts.
> The -m parameter for setfont/consolechars is not provided so correct codepage 
> is not set. This is non issue for USA and Western Europe as the default 
> legacy us-ascii and valid for these regions ISO8859-1 are not different at 
> everyday linux use on console.
> 
> Unfortunately the others need to set correct charmap to have all needed 
> local characters visible.
> 
> The attached patch allows to setup correct charmap by reading its name 
> from /etc/charmap. If the file does not exist the codepage is not set and 
> defaults to us-ascii as before.
> 
> How to create charmap file:
> Make raw text file with name of charmap inside.
> 
> Where to look for charmap name:
> for kbd module the setfont codepages are present in:
> /usr/share/consolefonts/partialfonts/
> Just get the name without extension (ignore everything after first dot):
> for example (to load ISO8859-2):
> name is: 8859-2
> for all 8859-2.a0-ff.??.gz - setfont auto detects which codepage file should 
> load by looking at loaded font size.

I'm OK with this patch with the note that it'll force me to write another menu 
for the ISO installer...

Go ahead and commit the change to the bootmisc file.

Auke

> 
> The bad thing:
> consolechars uses different codepage names (and possible different location - 
> but this is not issue as consolechars autodetect the right path) however uses 
> the same -m parameter to choose codepage and also ignores everything after 
> first dot in filename). Example for ISO8859-2 to put inside /etc/charmap:
> iso02
> 
> list of attachments:
> bootmisc.patch - the patch
> charmap.setfont - example of charmap file for setfont
> charmap.consolechars - example of charmap file for consolechars
> 
> have a nice day,
> Zbigniew 'zbiggy' Luszpinski
> 
> 
> ------------------------------------------------------------------------
> 
> --- /etc/init.d/bootmisc	2007-03-05 18:08:55.000000000 +0100
> +++ /etc/init.d/bootmisc	2007-03-07 12:56:18.000000000 +0100
> @@ -16,6 +16,10 @@
>      touch /var/run/utmp /var/run/wtmp
>      [ ! -f /etc/LOCALE ] || . /etc/LOCALE
>      [ ! -f /etc/keymap ] || loadkeys -q $(cat /etc/keymap)
> -    [ ! -f /etc/consolefont ] || $CONSOLETOOL $(cat /etc/consolefont)
> +    if [ -f /etc/charmap ]; then
> +	[ ! -f /etc/consolefont ] || $CONSOLETOOL $(cat /etc/consolefont) -m $(cat /etc/charmap);
> +    else
> +	[ ! -f /etc/consolefont ] || $CONSOLETOOL $(cat /etc/consolefont);
> +    fi
>      ;;
>  esac
> 
> 
> ------------------------------------------------------------------------
> 
> iso02
> 
> 
> ------------------------------------------------------------------------
> 
> 8859-2
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Lunar mailing list
> Lunar at lunar-linux.org
> http://foo-projects.org/mailman/listinfo/lunar


More information about the Lunar mailing list