[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UTF-8 issue

From: Mariano Suárez-Alvarez
Subject: UTF-8 issue
Date: Sun, 05 Dec 2004 01:50:41 -0300


someone just made me note the following behavior with respect to UTF-8
handling: on a bash command line,

        1) type: read A
        2) type a ñ character, that is, a U+00F1 LATIN SMALL LETTER N
        WITH TILDE character
        3) now backspace it away and hit Enter.
        4) now say: echo $A | od -x
        5) you should see 
                0000000 0ac3
        although it should be just 0a. (Note UTF-8 for the ñ
        character is 0xC3 0xB1, so I'm getting the remnants of the
        deleted ñ) 

I don't know if this is due to bash doing something wrong during the
read (maybe it does not set up the line discipline correctly?) or
something else. So you are my first try at nailing this ;-)


-- m

PS: Btw, the bash version is: GNU bash, version 3.00.15(2)-release
(i486-slackware-linux-gnu), and uname -a returns: Linux grothendieck #4 Tue Oct 26 23:17:36 ART 2004 i686 unknown unknown GNU/Linux
I can provide any info you may need. No bashbug around here, though :(

Mariano Suárez-Alvarez <address@hidden>

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]