#!/bin/bash printf "\xF7\xCf\xD4" | LC_ALL=ru_RU.UTF8 sed -e 's/./X/g' # ожидаемый вывод "ХХХ", а выводит исходную строчку без изменений # при том, что в в info sed написано "Matches any character"
В том же info sed наткнулся: `z' This command empties the content of pattern space. It is usually the same as `s/.*//', but is more efficient and works in the presence of invalid multibyte sequences in the input stream. POSIX mandates that such sequences are _not_ matched by `.', so that there is no portable way to clear `sed''s buffers in the middle of the script in most multibyte locales (including UTF-8 locales). Так что это известно и считается правильным. Закрываю как NOTABUG, сочувствую обитателям локали utf8 :)