UTF-8 input in iterm2

3,581 views
Skip to first unread message

mejedi

unread,
Jan 5, 2011, 3:24:13 PM1/5/11
to iterm2-discuss
Hi!

How do I setup iterm2 to generate utf-8 sequences for the keys
pressed?
I do have UTF-8 selected in Bookmarks>Default>Terminal>Character
Encoding but it doesn't help.

George Nachman

unread,
Jan 5, 2011, 4:17:06 PM1/5/11
to iterm2-...@googlegroups.com, iterm2-discuss
Try setting the environment var LC_CTYPE to UTF-8.

Marc Haisenko

unread,
Jan 5, 2011, 5:12:14 PM1/5/11
to iterm2-...@googlegroups.com
I think that should be "en_US.UTF-8" (at least that's what I have... except for LANG, where I have "de_DE.UTF-8"). To set all locale settings at once use

export LC_ALL="en_US.UTF-8"

You can check your current settings via the "locale" command.

Regards,
Marc

--
Marc Haisenko
ma...@darkdust.net

mejedi

unread,
Jan 8, 2011, 8:26:15 AM1/8/11
to iterm2-discuss
It doesn't help either.

I start iterm2. My shell is bash. I switch my keyboard to russian and
press some random keys.
Either nothing happens or an octal escape appers, ex \320 for 'Я'.
Surprisingly, Terminal.app "just works".

This is `locale' output in Terminal.app:

LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=


This is `locale' output in Iterm2:

LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=


Changing LC_CTYPE or even LC_ALL in the running bash doesn't fix
anything.

BTW, probably I'm missing something but for me this clearly looks like
an issue on the iTerm side, rather than a program's fault to interpret
incoming data correctly.
Reply all
Reply to author
Forward
0 new messages