General
cancel
Showing results for 
Search instead for 
Did you mean: 

£ character is not getting displayed

ssheri
Advisor

£ character is not getting displayed

Hi,

I am using HP-UX 11.11. I am not able to print £ character. When I type £ character, system prints # charachter. Please help me to resolve this.
11 REPLIES
Keith Bryson
Honored Contributor

Re: £ character is not getting displayed

Hi there - are you using a serial console here or something like telnet/putty/ssh?

Keith
Arse-cover at all costs
ssheri
Advisor

Re: £ character is not getting displayed

I am using telnet through putty.
Kapil Jha
Honored Contributor

Re: £ character is not getting displayed

are you trying to print it in some ascii file, or how??

are you using UK keyboard?

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Steven Schweda
Honored Contributor

Re: £ character is not getting displayed

> I am using telnet through putty.

There's only one version of PuTTY? With no
configuration options?

I know nothing, but I'd guess that PuTTY
offers more than one keyboard mapping, and
more than one display character set. The
non-psychics here don't know which key you're
using on which keyboard, so we don't know
what's being sent to the HP-UX system. If it
sees "#", then it might reasonably be
expected to echo back "#".

http://www.chiark.greenend.org.uk/~sgtatham/putty/docs.html

Output from "stty -a" might also be
interesting.
ssheri
Advisor

Re: £ character is not getting displayed

Thank you all.

I am using UK Keyboard.

For me to display £ on putty session, I have to hold "shift" key and press key "3". But intead of printing £ character on putty terminal it displays # character.

Please fidn below o/p for stty -a
=========================================

stty -a
speed 9600 baud; line = 0;
rows = 24; columns = 80
min = 4; time = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U
eof = ^D; eol = ^@; eol2 ; swtch
stop = ^S; start = ^Q; susp = ^Z; dsusp
werase ; lnext
parenb -parodd cs7 -cstopb hupcl -cread -clocal -loblk -crts
-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo echoe -echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop tab3
Steven Schweda
Honored Contributor

Re: £ character is not getting displayed

> I am using UK Keyboard.

Does PuTTY know that? On a US keyboard,
Shift+3 should give 0x23 ("#"). I don't know
how to tell PuTTY that it should really be
0x43 ("£"), but I'd guess that there is a way.
Steven Schweda
Honored Contributor

Re: £ character is not getting displayed

> 0x43 ("£"), [...]

My eys (and brain) must be failing. 0xA3,
not 0x43.

Also:

> [...] parenb -parodd cs7 [...]

Should that be "-parenb cs8"? It's hard to
get 0xA3 into seven bits. Does Telnet care
about these settings? "man telnet":

[...]
telnet supports 8-bit characters when communicating with the server on the remote host. To
use eight-bit characters you may need to reconfigure your terminal or the remote host
appropriately (see stty(1)). Furthermore, you may have to use the binary toggle to enable an
8-bit data stream between telnet and the remote host.
[...]

Seems so.
Bill Hassell
Honored Contributor

Re: £ character is not getting displayed

ASCII defines 94 displayable characters (see man ASCII) so it will always be an exception to find a British pound or Euro symbol. Truly dumb terminal emulators display the standard characters -- the rest (with the 8th bit set) are ignored, cause some change on the screen, or other behavior.

So the emulator (PuTTY in this case) must have a lot of special character handling to produce a Euro or pound or characters from Arabic or German or Swedish or Spanish, etc. The PuTTY web site has a lot to say about special character mapping:

=======================

4.10.1 Controlling character set translation

During an interactive session, PuTTY receives a stream of 8-bit bytes from the server, and in order to display them on the screen it needs to know what character set to interpret them in.

There are a lot of character sets to choose from. The â Received data assumed to be in which character setâ option lets you select one. By default PuTTY will attempt to choose a character set that is right for your locale as reported by Windows; if it gets it wrong, you can select a different one using this control.

A few notable character sets are:

* The ISO-8859 series are all standard character sets that include various accented characters appropriate for different sets of languages.
* The Win125x series are defined by Microsoft, for similar purposes. In particular Win1252 is almost equivalent to ISO-8859-1, but contains a few extra characters such as matched quotes and the Euro symbol.
* If you want the old IBM PC character set with block graphics and line-drawing characters, you can select â CP437â .
* PuTTY also supports Unicode mode, in which the data coming from the server is interpreted as being in the UTF-8 encoding of Unicode. If you select â UTF-8â as a character set you can use this mode. Not all server-side applications will support it.

If you need support for a numeric code page which is not listed in the drop-down list, such as code page 866, then you can try entering its name manually (CP866 for example) in the list box. If the underlying version of Windows has the appropriate translation table installed, PuTTY will use it.

==================================

The first sentence above concerning 8-bit characters is critical. The HP default (completely archaic but still the default) is cs7. Replace the stty lines in /etc/profile, /etc/skel/.profile and all the $HOME directories on your system with:

stty erase "^H" kill "^U" intr "^C" eof "^D" -parity ixoff
stty susp \^Z dsusp \^Y



Bill Hassell, sysadmin
ssheri
Advisor

Re: £ character is not getting displayed

Hi,

I have tested by replacing the stty lines. But no success.

Peoblem persists for Keavt terminal sessions also.
ssheri
Advisor

Re: £ character is not getting displayed

Hi All,

I have resolved this issue by using below command.

# stty cs8 -istrip

==========================

Thanks to all for your valuable suggestions.
Steven Schweda
Honored Contributor

Re: £ character is not getting displayed

> # stty cs8 -istrip

Ah.

istrip (-istrip)

Strip (do not strip) input characters
to seven bits.


Input, output... I suppose that it had to be
one or the other. (Or both.)