I've tried to add localized news to my overlay and found a bug in news title highlighting in cases when it is UTF-8 in title. Example of bug appearance: % echo ${LC_ALL} ru_RU.UTF-8 % echo ${LANG} ru_RU.UTF-8 % head -n1 2012-04-21-remaking-of-zen-sources.ru.txt Title: Обновление ебилда на ZEN % eselect news read 8 | head -n2 2012-04-21-remaking-of-zen-sources Title %%%HI%%%Обновление ебилда на ZEN%%%RE%%% % export LC_ALL=C % head -n1 2012-04-21-remaking-of-zen-sources.en.txt Title: Remaking of ZEN-sources ebuild % eselect news read 8 | head -n2 2012-04-21-remaking-of-zen-sources Title Remaking of ZEN-sources ebuild Also, I tried to find the bug and I think, that bug is in bash's replacing in apply_text_highlights funtion in /usr/share/eselect/lib/soutput.bash when it replace text in "text" variable. Reproducible: Always
*libs/output.bash ;)
This seems to be a regression in bash-4.2_p24. The problem occurs if the string contains UTF-8 characters and if the extglob shell option is set: $ LC_ALL=en_US.UTF-8 $ shopt -s extglob First try with ASCII only, works as expected: $ text="aaabbb" $ echo "${text} ${text//?aa} ${text//\aaa}" aaabbb bbb bbb But it fails with UTF-8: $ text="aaaäöü" $ echo "${text} ${text//?aa} ${text//\aaa}" aaaäöü aaaäöü aaaäöü Without extglob, it appears to work properly again: $ shopt -u extglob $ echo "${text} ${text//?aa} ${text//\aaa}" aaaäöü äöü äöü I don't see the problem with bash-4.1_p11. Reassigning to base-system.
moved upstream then as 4.1 works but 4.2 fails
Patch available (2nd answer), so what we prefer to do now? Waiting for release of new version in upstream or add a patch? ;)
i'm going to wait to see what Chet says
Chet OK-ed it, so i've added it to 4.2_p24-r1