Operating System - Tru64 Unix
1831554 Members
3797 Online
110025 Solutions
New Discussion

Re: briish pound symbol

 
Colin_23
New Member

briish pound symbol

I am getting the following string sent to me in a file £ this is the hex entity value for the £ symbol in XML. I need to convert this to £. I have tried sed "s/\£/£/g" and when I cat the ooutput it does show the £ symbol, but when I vi the file I cannot see it and when I arrow over where it should be vi exits.
when I read the output file from a ProC file it thinks the £ is lower case p.
3 REPLIES 3
Erich Wimmer
Valued Contributor

Re: briish pound symbol

Colin,
I have tested this on my Tru64 system, version V5.1b. Wether or not setting the language variable "LANG=en_GB.ISO8859-1" it worked fine without problems. I don't know what a "ProC" file is.

You should check the following:
Does your converted file really contain hex code "a3" for the pound sign? (according ISO 8859-1).
Terminal-settings (stty -a):
"cs8", "-istrip", "-parenb" and "-parodd" should be set.

"vi" may get problems if your file contains some other control codes instead. Also I know about some very old "vi" versions not able to deal with 8 bit characters.

Hope this helps, Erich
Colin_23
New Member

Re: briish pound symbol

Tried setting the LANG environment vaiable to en_GB.ISO8859-1 but made no difference.

My NLS_LANG is set to AMERICAN_UNITED KINGDOM.WE8ISO8859P1.

sed "s/\£/£/g" works fine on the command line but not from within a script.
Erich Wimmer
Valued Contributor

Re: briish pound symbol

Colin,
try the enclosed script (change the filenames in the scripts accordingly). This works on my Tru64 system, without $LANG setting.

Good luck, Erich.