UTF-8 in terminal


sinoth

Member
Joined
Sep 9, 2008
Messages
163
Website
Visit site
I've been trying to use telnet with an application that uses UTF-8 and I can't seem to get it to display properly. I can't seem to find any settings in xfce terminal to change encoding... anyone have tips for enabling proper UTF-8 in a term?
 
On all recent unixoids UTF-8 is the encoding of choice, you can be sure that not only your terminal but like the whole system is already running on UTF-8.


This is a general telnet problem:

Wikipedia said:
Another difference of Telnet from a raw TCP session is that Telnet is not 8-bit clean by default. 8-bit mode may be negotiated, but high-bit-set octets may be garbled until this mode was requested, and it obviously will not be requested in non-Telnet connection. The 8-bit mode (so named binary option) is intended to transmit binary data, not characters though. The standard suggests the interpretation of codes \000–\176 as ASCII, but does not offer any meaning for high-bit-set data octets. There was an attempt to introduce a switchable character encoding support like HTTP has, but nothing is known about its actual software support.
Tried binary mode?
 
Last edited by a moderator:
Tried binary mode?

Nice tip Letalis, but I can't figure out how to get the Pandora telnet client to use binary mode. It appears the normal flag to pass is -8 but our client has no such flag :/ I assume this is because it's using the simplified BusyBox telnet. Guess I will try to get a 'real' telnet binary...
 
Ugh, I apologize for the double post but this is driving me bonkers. I installed a new telnet binary (that supports -8 binary mode) and I've even tried other terminals (rxvt, xterm) and none of them will display UTF8 correctly. A lot of the fixes I find from google talk about changing locale settings, but even this didn't yield any results.. I added the following to .bashrc and .bash_profile:



Code:
export LANG="en_US.utf8"


Still, no good. I verified that we have the en_US.utf8 locale installed by using "localedef --list-archive" and it appears to be there. Also, just to verify it is something wrong on Pandora's end, I can SSH into my Pandora (through Putty in Windows) and use telnet through there and UTF displays fine. It only won't display if I'm on the Pandora itself.
 
Close all terminals. ALT-F2 to run xterm.



Code:
export LANG=en_US.utf8

terminal


UTF-8 seems to work from that terminal just fine. I dont see what your problem is.
 
Back
Top