bug-bash
[Top][All Lists]
Advanced

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

[3.0] UTF8 and IFS


From: Stephane Chazelas
Subject: [3.0] UTF8 and IFS
Date: Thu, 29 Jul 2004 16:59:00 +0100
User-agent: Mutt/1.5.6i

It seems that multi-byte characters can't be used as splitting ones:

bash-3.00$ locale charmap
UTF-8
bash-3.00$ a=$(printf '%b' 'A\0303\0251B')
bash-3.00$ IFS=$(printf '%b' '\0303\0251')
bash-3.00$ [[ $a = "A${IFS}B" ]] && echo yes
yes
bash-3.00$ set $a
bash-3.00$ [[ $1 = A ]] || echo no
no
bash-3.00$ printf %s "$1" | od -to1
0000000 101 303 251 102
0000004

Problem also for "$*":
bash-3.00$ set a b
bash-3.00$ printf %s "$*" | od -to1
0000000 141 303 142
0000003

(instead of 141 303 251 142)

regards,
Stephane

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________




reply via email to

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