Loading ...
Sorry, an error occurred while loading the content.

3624Mac Terminal.app, utf-8 and vim

Expand Messages
  • Peter Vohmann
    Dec 2, 2005
      Hi folks,

      I use vim most often remotely (ssh) from my PowerMac G5, and I
      started to scratch my head why I fail to use german umlaute while
      everything else seems to be setup and behave propertly.

      When I type "ä" into vim on the mac, I get "ä" instead. You've heard
      it before, right? I have everything set to utf-8, and displaying such
      files is not a problem to vim, it shows them proper as does "cat". I
      prefer utf-8 generally over latin1, or the proprietary macroman (ugh).

      I like to use Terminal.app and compared it to xterm on the Mac.

      I verified that my keyboard submits utf-8 in each case by typing a
      few characters into hexdump, like this. This is the same on every

      $ hexdump -C
      ääääääää <CR><EOF>
      00000000 c3 a4 c3 a4 c3 a4 c3 a4 c3 a4 c3 a4 c3 a4 c3 a4 |
      00000010 0a |.|

      I tried the local vim (/usr/bin/vim 6.2) of Mac OS X (10.4.3), the
      mac vim 6.4,
      and a remote vim 6.3.81(ssh to Linux Redhat).
      In all cases I have LC_CTYPE=en_US.utf8 in the shell, and vim derives
      correctly encoding=utf8. Setting termencoding doesn't help.

      mac-vim is ok in gui mode, and is faulty inside Terminal.app as well.

      In any combination, the kind of Terminal matters: vim in Terminal.app
      always translates the key press to "ä". If I start up vim in xterm
      in X11, typing "ä" gives me an "ä"!

      Terminal.app sets TERM=xterm, but there must be an odd difference
      between the two.
      Harr, it happens on input input input!

      And since I ssh to foreign systems, a replacement to vim would not
      exactly be helpful... I'd be thankful for any light shed on this, and
      a solution in the best case...

      Kind regards,
      Peter Vohmann
    • Show all 10 messages in this topic