LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unreadable characters in error messages and man page output (https://www.linuxquestions.org/questions/linux-newbie-8/unreadable-characters-in-error-messages-and-man-page-output-828125/)

gangadher 08-24-2010 12:41 AM

Unreadable characters in error messages and man page output
 
Hi,

The problem goes this way,

The error messages displayed by commands(ls, bash etc) and man page output
contain unreadable characters. I tried Ctrl+l, stty sane but that didn't work.
Say I execute cmd "ganga" which is not a linux cmd. I should get error saying "ganga:No such cmd" but I get something like this
"ganga :( some unreadable message)"


This is what I got when i ran "man grep"


名称
grep, egrep, fgrep, zgrep - パターンにマッチする行を表示する

書式
ggrreepp [_o_p_t_i_o_n_s] _P_A_T_T_E_R_N [_F_I_L_E...]
ggrreepp [_o_p_t_i_o_n_s] [--ee _P_A_T_T_E_R_N | --ff _F_I_L_E]
and soon

Please someone helpme

David the H. 08-24-2010 01:41 AM

It looks like your system is set up with a Japanese language environment. Run the command "locale" and show us what you get.

Also tell us your distribution, the desktop environment you're using, and any other information you think we might find useful about your setup.

Finally, please use [code]...[/code] tags when you need to post any pre-formatted output.

gangadher 08-24-2010 04:30 AM

I actually study in college. We access our linux accounts(only console no GUI) over putty software

This is what I could gather from uname

Distribution: Linux 2.6.18 x86_64

output of locale
<locale>

LANG=ja_JP.UTF-8
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER="ja_JP.UTF-8"
LC_NAME="ja_JP.UTF-8"
LC_ADDRESS="ja_JP.UTF-8"
LC_TELEPHONE="ja_JP.UTF-8"
LC_MEASUREMENT="ja_JP.UTF-8"
LC_IDENTIFICATION="ja_JP.UTF-8"
LC_ALL=

</locale>

LC_ALL had no value

Andrew Benton 08-24-2010 05:17 AM

You don't say where you're from, so assuming you're in the US, try
Code:

export LC_ALL=en_US.UTF-8

gangadher 08-24-2010 06:06 AM

I am from Bangalore,India


The above statement( export LC_ALL=en_US.UTF-8 ) worked.
Now I get proper error messages in english.

Ex: $hld //hld is not a linux cmd
bash: hld: command not found //expected error message
$

But man pages are still cluttered. Unlike earlier where I had unreadable characters now I have question marks

Ex $man grep
GREP(1)

??
grep, egrep, fgrep, zgrep - ????????????????

??
grep [options] PATTERN [FILE...]
grep [options] [-e PATTERN | -f FILE] [FILE...]

??
grep ?? FILE ??????????????? (????????????
?? file ???? - ?????????????) ???????????
PATTERN ???????????????????????????? grep
??????????????

and soon.

Thanks a lot David and Andrew.
I can now see error messages in english.
I am not bothered about man pages as I can get them from web.


Thanks once again.

brianL 08-24-2010 06:42 AM

I don't whether this applies to your distro, but in Slackware if you want to use unicode, you have to run unicode_start, it's a script in /usr/bin. Then select a unicode font. Don't know if that would solve your problem.

GrapefruiTgirl 08-24-2010 06:46 AM

@ BrianL - I've never heard of that script - and never used it.. Hmm.. Does that need/want to be run at startup each time, or does it just run once and "do something" that sticks?

Thanks,

Sasha

brianL 08-24-2010 06:49 AM

Run once. Got the procedure from here:
http://slackwiki.org/Utf-8_linux_console

catkin 08-24-2010 07:49 AM

Quote:

Originally Posted by GrapefruiTgirl (Post 4076010)
@ BrianL - I've never heard of that script - and never used it.. Hmm.. Does that need/want to be run at startup each time, or does it just run once and "do something" that sticks?

Perhaps it is run during installation if you answer Yes to the "UTF-8 text console" prompt (which defaults to No).

brianL 08-24-2010 07:58 AM

You can edit lilo.conf:
Change:
Code:

# Append any additional kernel parameters:
append=" vt.default_utf8=0"

To:
Code:

# Append any additional kernel parameters:
append=" vt.default_utf8=1"

I've done it on my desktop, but not my laptop (yet).


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