LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 12-27-2009, 12:27 PM   #1
ghostknife
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Rep: Reputation: 0
Terminal shows unicode squares for control characters


My terminal shows unicode squares (the little square with it's 2 byte unicode value inside it), whenever I press a control character while running a program (ex. cat or ping).

See this example. Here I show the key's I pressed then turn off echoctl, and repeat the sequence. http://imagebin.ca/img/mXbutJ1.png

the 0003 is when I pressed Ctrl+C, and the 001A is when I pressed ctrl+z.

Can anybody tell me why this is or how to turn it off. This is inside a gnome-terminal session, though I don't think it's gnome-terminal.

If, inside this exact same bash session I open screen (by typing "screen"), it doesn't do this anymore, and ctrl+c/z/etc is completely quiet.
 
Old 12-27-2009, 12:46 PM   #2
ozanbaba
Member
 
Registered: May 2003
Location: Tengiz
Distribution: Slackware64 14.1
Posts: 671

Rep: Reputation: 94
what's output of echo $LANG
 
Old 12-29-2009, 05:53 AM   #3
ghostknife
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the reply. This is frustrating and unusually difficult to solve for some reason.

To answer your question. My LANG is set to en_US.UTF-8. I set it to this in an attempt to solve the problem, to see if it makes a difference. Before it was on en_ZA.UTF-8, which is the configuration for all my machines (which work fine).

Again, if I were to run a screen session from the affected shell instance, the same LANG value exists, and the control characters are gone. Running the shell from tty1-6 works as intended as well.

It seems to be only the initial /bin/bash session when running through gnome-terminal.
 
Old 12-29-2009, 11:56 AM   #4
ozanbaba
Member
 
Registered: May 2003
Location: Tengiz
Distribution: Slackware64 14.1
Posts: 671

Rep: Reputation: 94
Quote:
Originally Posted by ghostknife View Post
Thanks for the reply. This is frustrating and unusually difficult to solve for some reason.

To answer your question. My LANG is set to en_US.UTF-8. I set it to this in an attempt to solve the problem, to see if it makes a difference. Before it was on en_ZA.UTF-8, which is the configuration for all my machines (which work fine).

Again, if I were to run a screen session from the affected shell instance, the same LANG value exists, and the control characters are gone. Running the shell from tty1-6 works as intended as well.

It seems to be only the initial /bin/bash session when running through gnome-terminal.
maybe somehow stty is not unicode readdy.
 
Old 12-30-2009, 06:39 AM   #5
ghostknife
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Why do you think it's stty? Afterall, in a screen session or pure tty1-6 it works fine.
 
Old 12-30-2009, 06:46 AM   #6
ozanbaba
Member
 
Registered: May 2003
Location: Tengiz
Distribution: Slackware64 14.1
Posts: 671

Rep: Reputation: 94
Quote:
Originally Posted by ghostknife View Post
Why do you think it's stty? Afterall, in a screen session or pure tty1-6 it works fine.
i don't have any problems in terminals as you do (do it console from tty1-6) or terminal emulator in X system (xfce4-terminal what i use).

if you send ^c to system and it shows characters, and not do what it suppose to do (die peacefully). some place it catch and interpreted wrong in some place. my prime suspect is stty right now.

maybe stty change the settings to something wrong.

PS: some reference information about LANG variable for future use by anybody. en_ZN.UTF-8; en is for language defining, ZN is country code and important for deciding which locale setting will be used. UTF-8 is default encoding.

Last edited by ozanbaba; 12-30-2009 at 06:49 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do new unicode characters get implemented j1wu Linux - Software 1 04-18-2009 02:23 AM
KDE splash screen has squares instead of latin characters calande Linux - Software 0 11-22-2006 11:47 PM
Cyrillic characters display as squares papasasha Slackware 23 01-02-2006 03:42 PM
squares instead of arabic characters on Slackware 10.1 with KDE 3.4 Basel Slackware 2 06-18-2005 01:38 PM
characters as squares in mozilla icyfire Linux - Software 4 09-18-2003 05:22 PM


All times are GMT -5. The time now is 11:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration