Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 41903 Details for
Bug 32111
enable utf8 support in console
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
utf8-console2.patch
utf8-console2.patch (text/plain), 4.36 KB, created by
SpanKY
on 2004-10-15 10:49:13 UTC
(
hide
)
Description:
utf8-console2.patch
Filename:
MIME Type:
Creator:
SpanKY
Created:
2004-10-15 10:49:13 UTC
Size:
4.36 KB
patch
obsolete
>Index: etc/rc.conf >=================================================================== >RCS file: /var/cvsroot/gentoo-src/rc-scripts/etc/rc.conf,v >retrieving revision 1.27 >diff -u -B -r1.27 rc.conf >--- etc/rc.conf 3 Oct 2004 09:13:02 -0000 1.27 >+++ etc/rc.conf 15 Oct 2004 17:47:09 -0000 >@@ -17,6 +17,12 @@ > EXTENDED_KEYMAPS= > #EXTENDED_KEYMAPS="backspace keypad euro" > >+# UNICODE specifies whether you want to have UNICODE support in the console. >+# If you set it to yes, please make sure to set a UNICODE aware CONSOLEFONT >+# and KEYMAP >+ >+UNICODE="no" >+ > # CONSOLEFONT specifies the default font that you'd like Linux to use on the > # console. You can find a good selection of fonts in /usr/share/consolefonts; > # you shouldn't specify the trailing ".psf.gz", just the font name below. >Index: init.d/consolefont >=================================================================== >RCS file: /var/cvsroot/gentoo-src/rc-scripts/init.d/consolefont,v >retrieving revision 1.24 >diff -u -B -r1.24 consolefont >--- init.d/consolefont 23 Aug 2004 06:39:41 -0000 1.24 >+++ init.d/consolefont 15 Oct 2004 17:47:09 -0000 >@@ -5,6 +5,7 @@ > > depend() { > need localmount >+ need keymaps # sets up terminal encoding scheme > after hotplug > } > >@@ -13,6 +14,10 @@ > local param= > local sf_param= > local retval=1 >+ local ttydev= >+ [ -d /dev/vc ] \ >+ && ttydev=/dev/vc/ \ >+ || ttydev=/dev/tty > > if [ -n "${CONSOLEFONT}" ] > then >@@ -23,10 +28,10 @@ > fi > > # Actually setting font >+ local errmsg="" >+ ebegin "Setting user font" > if [ -x /bin/setfont ] > then >- ebegin "Setting user font" >- > # We patched setfont to have --tty support ... > if [ -n "`setfont --help 2>&1 | grep -e '--tty'`" -o \ > -n "`setfont --help 2>&1 | grep -e '-C'`" ] >@@ -40,45 +45,21 @@ > > for x in $(seq 1 "${RC_TTY_NUMBER}") > do >- # Using DEVFS ? >- if [ -e /dev/.devfsd ] || \ >- [ -e /dev/.udev -a -d /dev/vc ] >- then >- /bin/setfont ${CONSOLEFONT} ${param} \ >- ${sf_param}/dev/vc/${x} >/dev/null >- retval=$? >- else >- /bin/setfont ${CONSOLEFONT} ${param} \ >- ${sf_param}/dev/tty${x} >/dev/null >- retval=$? >- fi >+ /bin/setfont ${CONSOLEFONT} ${param} \ >+ ${sf_param}/${ttydev}${x} >/dev/null >+ retval=$? > done > else > /bin/setfont ${CONSOLEFONT} ${param} >/dev/null > retval=$? > fi >+ errmsg="Failed to set user font" > else > # No console program installed! >- eend 1 "The setfont executable was not found" >- return 1 >- fi >- >- if [ "${retval}" -eq 0 ] >- then >- for x in $(seq 1 "${RC_TTY_NUMBER}") >- do >- # Using DEVFS ? >- if [ -e /dev/.devfsd ] || \ >- [ -e /dev/.udev -a -d /dev/vc ] >- then >- echo -ne "\033(K" >/dev/vc/${x} >- else >- echo -ne "\033(K" >/dev/tty${x} >- fi >- done >+ retval=1 >+ errmsg="The setfont executable was not found" > fi >- >- eend ${retval} "Failed to set user font" >+ eend ${retval} "${errmsg}" > else > ebegin "Using the default console font" > eend 0 >Index: init.d/keymaps >=================================================================== >RCS file: /var/cvsroot/gentoo-src/rc-scripts/init.d/keymaps,v >retrieving revision 1.22 >diff -u -B -r1.22 keymaps >--- init.d/keymaps 16 Sep 2004 12:30:13 -0000 1.22 >+++ init.d/keymaps 15 Oct 2004 17:47:09 -0000 >@@ -26,21 +26,11 @@ > echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes > fi > >- ebegin "Loading key mappings" >- >- # Enable unicode ... >- set -- ${KEYMAP} >- if [ "$1" = "-u" ] >- then >- /usr/bin/kbd_mode -u >- KEYMAP="${KEYMAP/-u}" >- fi >- > # New kbd support ... >+ ebegin "Loading key mappings" > if [ -x /bin/loadkeys ] > then > [ "${SET_WINDOWKEYS}" = "yes" ] && WINDOWKEYS_KEYMAP="windowkeys" >- > /bin/loadkeys -q ${WINDOWKEYS_KEYMAP} ${KEYMAP} \ > ${EXTENDED_KEYMAPS} >/dev/null > else >@@ -48,6 +38,29 @@ > return 1 > fi > eend $? "Error loading key mappings" >+ >+ # Enable unicode if requested ... see utf-8(7) for info >+ local termencoding="" termmsg="" >+ if [ "${UNICODE}" == "yes" ] >+ then >+ /usr/bin/kbd_mode -u >+ dumpkeys | loadkeys --unicode >+ termencoding=$'\xb1%G' >+ termmsg="UTF-8" >+ else >+ termencoding=$'\xb1%@' >+ termmsg="ASCII" >+ fi >+ local n ttydev="" >+ [ -d /dev/vc ] \ >+ && ttydev=/dev/vc/ \ >+ || ttydev=/dev/tty >+ ebegin "Setting terminal encoding to ${termencoding}" >+ for n in $(seq 1 "${RC_TTY_NUMBER}") >+ do >+ echo -n -e ${termencoding} > ${device}${n} >+ done >+ eend 0 > } > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32111
:
19858
|
40106
|
40107
|
41443
| 41903 |
42107