Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using OSX 10.6.8 and telnet via terminal. I can input russian (utf8) symbols in terminal, but when i use telnet, i can see russian symbols, but cannot input them (instead of "тест" i get "Q^BP5Q^AQ^B" for example).

How can i fix that? Should I put something in ~/.telnetrc ?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Telnet is used to connect to a shell-session on a remote host, you need to configure the remote hosts's shell to expect UTF-8. This is usually done by setting an environment variable ate the remote end. The exact details depend on the operating system and shell at the remote host. Here's one example:

export LANG=ru_RU.utf8

If the remote host is Linux, use locale -a inside the telnet session to get a list of supported values for this setting at the remote host.

share|improve this answer
    
I already got export LANG=ru export LC_ALL=ru_RU.utf-8 in my ~/.bash_login - it allows me to input russian text in the terminal, but when i start telnet, input becomes broken –  DataGreed Jul 18 '12 at 8:55
    
it seems to me like it has something to do with telnet encoding. In my question there is an example where i clearly input 4 utf8 symbols, but get 8 1-byte symbols. That's why my guess is that something should be in ~/.telnetrc –  DataGreed Jul 18 '12 at 8:57
    
@DataGreed: try LANG=ru_RU.utf8 (I can't recall if LANG overrrides LC_ALL). You are doing this at the remote end, not the local end aren't you? –  RedGrittyBrick Jul 18 '12 at 9:00
    
oh, i understood now. I am doing it on the local end. I have no access to configuring the remote server, but it supports UTF8 for sure. It returns text as utf, the problems start when i try to type smth in response –  DataGreed Jul 18 '12 at 9:02
    
are you sure that typing one symbols and getting another is a remote issue? –  DataGreed Jul 18 '12 at 9:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.