bug-bash
[Top][All Lists]
Advanced

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

Pattern replacement fails if string contains multibyte characters


From: Bernd Eggink
Subject: Pattern replacement fails if string contains multibyte characters
Date: Fri, 28 Sep 2007 22:45:04 +0200
User-agent: Thunderbird 2.0.0.6 (X11/20070728)

This happens on a utf-8 based system (CRUX 2.3), LANG=de_DE.UTF-8:

t="123abc456äöüABCD"
echo ${t//[a-c]/}
# output: 123456öüCD
# (should be: "123456äöüABCD")

echo ${t//[!a-c]/}
# output: abcäAB
# (should be: "abc")

bash --version:
GNU bash, version 3.2.25(1)-release (i686-pc-linux-gnu)

Without multibyte chars, replacement works as expected. I looks like a bug, or am I misssing something?

Regards,
Bernd

--
Bernd Eggink
monoped@sudrala.de
http://sudrala.de




reply via email to

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