[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[3.0] UTF-8 and $@
From: |
Stephane Chazelas |
Subject: |
[3.0] UTF-8 and $@ |
Date: |
Thu, 29 Jul 2004 17:08:46 +0100 |
User-agent: |
Mutt/1.5.6i |
passing arguments verbatim doesn't work if first character of
IFS is a multibyte character.
bash-3.00$ locale charmap
UTF-8
bash-3.00$ set a b c
bash-3.00$ IFS=a
bash-3.00$ printf '<%s>\n' "$@"
<a>
<b>
<c>
bash-3.00$ IFS=$(printf %b '\0303\0251')
bash-3.00$ printf '<%s>\n' "$@" | od -tc
0000000 < a 303 b 303 c > \n
0000010
("$@" is one single argument!)
It's OK when IFS contains an invalid character in utf8 locale:
bash-3.00$ IFS=$(printf %b '\0230')
bash-3.00$ printf '<%s>\n' "$@"
<a>
<b>
<c>
(same problem when replacing "$@" with $@ or $*)
regards,
Stephane
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [3.0] UTF-8 and $@,
Stephane Chazelas <=