Debian Codegraph @

src/unicode_stop

raw ◀ ▶
1 Debian patch touch this file
1 #!/bin/sh
2
•3 if [ ! -e /proc/self/fd/0 ] ; then
4 echo "Won't set ascii mode: Can't determine console type;" >&2
5 echo " Please ensure that /proc is mounted." >&2
6 exit 1
7 fi
8
9 TTY=$(/usr/bin/tty)
10 case "$TTY" in
11 /dev/console|/dev/vc*|/dev/tty[0-9]*)
12 ;;
13 *)
14 echo "unicode_stop skipped on $TTY"
15 exit 0
16 ;;
17 esac
18
19 # stop unicode
20 kbd_mode -a
21 if test -t ; then
22 printf '\033%%@'
23 fi
24 stty -iutf8
25
26 uid="$(id -u 2>/dev/null)" ||:
27 if [ "$uid" = 0 ]; then
28 [ ! -r "$HOME/.kbd/.keymap_sv" ] ||
29 loadkeys "$HOME/.kbd/.keymap_sv"
30 fi