LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-20-2006, 04:27 AM   #1
Mehuge
LQ Newbie
 
Registered: Dec 2005
Posts: 22

Rep: Reputation: 15
Question FC4 telnet and ' characters in man pages


When viewing a manual (man gcc for exampe), the quotes areound `quoted' text is being displayed a 3 character sequence.

For example, the word Don't appears as Don<a^><euro><tm>t (where each <.> is 1 symbol).

The same happens in error messages generated by gcc.

How to I alter this character mapping behaviour?

**EDIT** Could a moderator move this to the Fedora forum for me thanks

Last edited by Mehuge; 10-20-2006 at 04:35 AM.
 
Old 10-20-2006, 04:24 PM   #2
Simon_6162
Member
 
Registered: Jul 2004
Location: UK
Distribution: Fedora, Gentoo, Redhat Enterprise
Posts: 141

Rep: Reputation: 16
What terminal are you using ?

It sounds like a character encoding problem. In gnome-terminal just go settings->character encoding

In konsole settings->encoding
 
Old 10-23-2006, 05:33 AM   #3
Mehuge
LQ Newbie
 
Registered: Dec 2005
Posts: 22

Original Poster
Rep: Reputation: 15
Its a plain telnet session (telnet-server), no X involved.

It does it when using windows telnet client, cygwin's telnet client and a commercial client.

Last edited by Mehuge; 10-23-2006 at 05:36 AM.
 
Old 10-23-2006, 01:07 PM   #4
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,151

Rep: Reputation: 46
you could try ssh; you do know that telnet has no security at all! even your passwords are sent in plain text! as simon said it looks like 'a character encoding problem' on the windows end

Last edited by johnson_steve; 11-17-2006 at 07:40 PM.
 
Old 10-24-2006, 09:15 AM   #5
Mehuge
LQ Newbie
 
Registered: Dec 2005
Posts: 22

Original Poster
Rep: Reputation: 15
I need to use telnet. I am interested in a solution to the problem with telnet.

Last edited by Mehuge; 10-26-2006 at 01:24 PM.
 
Old 11-16-2006, 09:08 AM   #6
Mehuge
LQ Newbie
 
Registered: Dec 2005
Posts: 22

Original Poster
Rep: Reputation: 15
** DELETED ** - Going to re-post as new question as the problem isnt telnet specific.

Last edited by Mehuge; 11-16-2006 at 09:13 AM.
 
Old 11-19-2006, 01:31 AM   #7
csea
LQ Newbie
 
Registered: Dec 2005
Posts: 5

Rep: Reputation: 0
I have to face the same problem when using windows telnet client, but i have not find out the solution.
 
Old 11-20-2006, 03:36 AM   #8
Mehuge
LQ Newbie
 
Registered: Dec 2005
Posts: 22

Original Poster
Rep: Reputation: 15
csea, I found a workaround. It seems related to the en_US.UTF-8 locale.

If I choose

en_US.iso8859

or

en_UK.UTF-8
en_UK.iso8859

the problem goes away.

So what I did to avoid this problem was in /etc/profile I added

LANG=en_UK.UTF-8 export LANG
 
Old 11-21-2006, 05:24 AM   #9
csea
LQ Newbie
 
Registered: Dec 2005
Posts: 5

Rep: Reputation: 0
Mehuge:
Thank you for your help,
in the file /etc/sysconfig/i18n
LANG=en_US.UTF-8,then it works very well.
when I typed "locale" in redhat as 4 ,the result is
LANG="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL

when i input "man gcc",it display normally,so en_US.UTF-8 is ok.
 
Old 11-21-2006, 05:58 AM   #10
csea
LQ Newbie
 
Registered: Dec 2005
Posts: 5

Rep: Reputation: 0
if you set your system as the following ,the problem will still exists.so
only adding "export LANG="en_US.UTF-8"" to the file ".bashrc" will be unable to solve the problem.

LANG=en_US.UTF-8
LC_CTYPE="zh_CN.GB2312"
LC_NUMERIC="zh_CN.GB2312"
LC_TIME="zh_CN.GB2312"
LC_COLLATE="zh_CN.GB2312"
LC_MONETARY="zh_CN.GB2312"
LC_MESSAGES="zh_CN.GB2312"
LC_PAPER="zh_CN.GB2312"
LC_NAME="zh_CN.GB2312"
LC_ADDRESS="zh_CN.GB2312"
LC_TELEPHONE="zh_CN.GB2312"
LC_MEASUREMENT="zh_CN.GB2312"
LC_IDENTIFICATION="zh_CN.GB2312"
LC_ALL=zh_CN.GB231
 
Old 11-23-2006, 05:56 AM   #11
Mehuge
LQ Newbie
 
Registered: Dec 2005
Posts: 22

Original Poster
Rep: Reputation: 15
csea, I have LANG=en_US.UTF-8 in /etc/sysconfig/i18n and I get the problem unless I reset LANG to something other than en_US.UTF-8 when running gcc/man etc.

My /etc/sysconfig/i18n is:

LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
SUPPORTED="en_US.UTF-8:en_US:en"

locale reports:

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

man and gcc give me the described problem:

If I change /etc/sysconfig/i18n to

LANG="en_UK.UTF-8"
SYSFONT="latarcyrheb-sun16"
SUPPORTED="en_UK.UTF-8:en_UK:en"

locale now reports

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_UK.UTF-8
LC_CTYPE="en_UK.UTF-8"
LC_NUMERIC="en_UK.UTF-8"
LC_TIME="en_UK.UTF-8"
LC_COLLATE="en_UK.UTF-8"
LC_MONETARY="en_UK.UTF-8"
LC_MESSAGES="en_UK.UTF-8"
LC_PAPER="en_UK.UTF-8"
LC_NAME="en_UK.UTF-8"
LC_ADDRESS="en_UK.UTF-8"
LC_TELEPHONE="en_UK.UTF-8"
LC_MEASUREMENT="en_UK.UTF-8"
LC_IDENTIFICATION="en_UK.UTF-8"
LC_ALL=

and man and gcc work (display quotes), however interestingly:

# man gcc

displays sequences like <E2><80><98><E2><80><98>

so it clearly isnt the proper/full solution.

Setting LANG unfortunatly breaks yum too - perhaps I need to re-init yum with the new LANG setting. I have to set LANG back to en_US.UTF-8 to get yum to work at present.

So... I still seek a proper solution to this problem (bug?) in FC4.

I found this article describes my exact problem:

http://www.redhat.com/archives/fedor.../msg03572.html

Sadly there is no reply to that thread and therefore no solution presented.
 
Old 11-23-2006, 08:52 AM   #12
Mehuge
LQ Newbie
 
Registered: Dec 2005
Posts: 22

Original Poster
Rep: Reputation: 15
Did a bit more experimenting and have found that:

gunzip < /usr/share/man/man1/gcc.1.gz | groff -Tutf8 -mandoc | more

exhibits the problem and

gunzip < /usr/share/man/man1/gcc.1.gz | groff -Tascii -mandoc | more

doesnt. Basically, the extra characters we are seeing are the utf8 encoding:-

http://www1.tip.nl/~t876506/utf8tbl.html

and our terminals (windows telnet, cygwin ssh etc) do not support or process UTF8 so they display the raw charcter sequences.

With this in mind, I looked at changing /etc/man.config to change the groff command to us -Tascii instead however I didnt have any success, it seemed regardless of what I put in /etc/man.config for the commands, when I type man gcc or whatever, I still see the UTF8 encoded sequences. Grr..

So. I am back to setting LANG=en_UK.iso8859 but now I set this as the system default in /etc/sysconfig/i8n.

Now I need to try and fix yum which does not like the new locale:

Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 67, in main
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib/python2.4/locale.py", line 381, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
 
Old 11-24-2006, 01:42 AM   #13
csea
LQ Newbie
 
Registered: Dec 2005
Posts: 5

Rep: Reputation: 0
Your os is fedora core 4,my os is redhat advanced server 4,Maybe the solution can't work well in your PC.

the file /etc/sysconfig/i18n in your pc is
LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
SUPPORTED="en_US.UTF-8:en_US:en"

If you change /etc/sysconfig/i18n to

LANG="en_UK.UTF-8"
SYSFONT="latarcyrheb-sun16"
SUPPORTED="en_UK.UTF-8:en_UK:en"

locale now reports
locale: Cannot set LC_CTYPE to default locale: No such file or
directory
locale: Cannot set LC_MESSAGES to default locale: No such file or
directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_UK.UTF-8
LC_CTYPE="en_UK.UTF-8"
LC_NUMERIC="en_UK.UTF-8"
LC_TIME="en_UK.UTF-8"
LC_COLLATE="en_UK.UTF-8"
LC_MONETARY="en_UK.UTF-8"
LC_MESSAGES="en_UK.UTF-8"
LC_PAPER="en_UK.UTF-8"
LC_NAME="en_UK.UTF-8"
LC_ADDRESS="en_UK.UTF-8"
LC_TELEPHONE="en_UK.UTF-8"
LC_MEASUREMENT="en_UK.UTF-8"
LC_IDENTIFICATION="en_UK.UTF-8"
LC_ALL=

The reason is that the file /etc/sysconfig/i18n includes
SUPPORTED="en_US.UTF-8:en_US:en"
but en_UK.UTF-8 is not in the list of SUPPORTED="en_US.UTF-8:en_US:en".you must install it
 
  


Reply

Tags
telnet, text


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange characters in man pages _maco_ Linux - General 2 06-01-2009 05:44 PM
man pages? synaptical Debian 4 06-13-2005 08:16 PM
Weird characters in man pages - possible CHARSET problem?? benr77 Linux - General 2 06-02-2005 01:44 PM
What do you mean by MAN pages? inspectreo Linux - Newbie 2 05-08-2005 02:12 PM
funny characters in man pages durden2.0 Linux - General 4 06-27-2003 12:34 AM


All times are GMT -5. The time now is 07:56 AM.

Main Menu
 
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
Open Source Consulting | Domain Registration