Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LANG changed with the same value in a script changes result

Status
Not open for further replies.

Ogzilal

MIS
Oct 9, 2003
280
FR
Hi,
I am deling with files containing french accentuated chars that can be stored in IBM-850 or ISO8859-1 code set and I discovered some mysterious things.

To talk simple, here is a script called try.ksh that rises up th problem :

root:/tmp:cat try.ksh
echo $LANG
print "à" |od -xc
LANG=fr_FR.IBM-1252@euro
echo $LANG
print "à" |od -xc

executin the script

root:/tmp:./try.ksh

fr_FR.IBM-1252@euro
0000000 850a
à \n
0000002
fr_FR.IBM-1252@euro
0000000 260a
& \n
0000002
root@cronos:/tmp:


Hexdecimal codin of 'à' changes after assigning LANG the same value 'fr_FR.IBM-1252@euro'

Has anyone undersatnding what is happening ?

Ali
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top