unicode_stop 363 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. TTY="`/usr/bin/tty`"
  3. case "$TTY" in
  4. /dev/console|/dev/vc*|/dev/tty[0-9]*)
  5. ;;
  6. *)
  7. echo "unicode_stop skipped on $TTY"
  8. exit 0
  9. ;;
  10. esac
  11. # stop unicode
  12. kbd_mode -a
  13. if test -t ; then
  14. printf '\033%%@'
  15. fi
  16. stty -iutf8
  17. uid="`id -u 2>/dev/null`" ||:
  18. if [ "$uid" = '0' ]; then
  19. [ ! -r "$HOME/.kbd/.keymap_sv" ] ||
  20. loadkeys "$HOME/.kbd/.keymap_sv"
  21. fi