Created
November 10, 2010 01:03
-
-
Save pbrisbin/670165 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if echo "$LOCALE" | /bin/grep -qi utf ; then | |
| stat_busy "Setting Consoles to UTF-8 mode" | |
| # UTF-8 consoles are default since 2.6.24 kernel | |
| # this code is needed not only for older kernels, | |
| # but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8. | |
| for i in /dev/tty[0-9]*; do | |
| /usr/bin/kbd_mode -u < ${i} | |
| printf "\033%%G" > ${i} | |
| done | |
| # the $CONSOLE check helps us avoid this when running scripts from cron | |
| echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\033%%G"; fi' >>/etc/profile.d/locale.sh | |
| stat_done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment