Looks like I've fixed this bug (see attached patch).

Some characters in dash are escaped for internal use (сшуЁ in UTF-8 = d1
81 d1 88 d1 83 d0 81 is translated to d1 81 81 d1 81 88 d1 81 83 d0 81
81), then unescaped. But redirection-to-file strings are treated
differently and are unescaped twice (d1 81 81 d1 81 88 d1 81 83 d0 81 81
-> d1 81 d1 88 d1 83 d0 81 -> d1 d1 d1 83 d0), in expandarg() function
at src/expand.c (in argstr(), then in rmescapes()).

By the way, EXP_REDIR flag is used only for this special treatment of
redirection-to-file strings. Could not find its origin, the oldest
commit at git://git.kernel.org/pub/scm/utils/dash/dash.git already has
it.


** Patch added: "dash-double-unescape.patch"
   http://launchpadlibrarian.net/43775320/dash-double-unescape.patch

-- 
dash interpreter don't handle some unicode characters correctly
https://bugs.launchpad.net/bugs/422298
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to