Incorrect handling UTF-8 symbol 'с' (U+0441) in redirection operator

Bug #382187 reported by Sergey Nizovtsev
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dash (Ubuntu)
New
Undecided
Unassigned

Bug Description

In mc (midnight commander) i've found that i can't open archives in folder named 'Рабочий стол' (this means 'Desktop' in russian). After some researching i've found that problem in /bin/sh (dash) - it can't redirect input or output from files that contains russian letter 'с'.

Steps to reproduce:
$ /bin/dash
$ echo 'с' | hexdump
0000000 81d1 000a
0000003
$ mkdir /tmp/с
$ touch /tmp/с/a.txt
$ echo ok > /tmp/с/a.txt
/bin/dash: cannot create /tmp/�/a.txt: Directory nonexistent
$ tail < /tmp/с/a.txt
/bin/dash: cannot open /tmp/�/a.txt: No such file

Expected result (example of bash session):
$ echo 'с' | hexdump
0000000 81d1 000a
0000003
$ mkdir /tmp/с
$ touch /tmp/с/a.txt
$ echo ok > /tmp/с/a.txt
$ tail < /tmp/с/a.txt
ok

Revision history for this message
Raúl Núñez de Arenas Coronado (dervishd) wrote :

Same problem here, but with character "∕", which is not the normal slash (directory separator), but U+2215. That's 0xe2 0x88 0x95 but dash treats it as 0xe2 0x95!

I discovered it trying to create a file and the problem was the same.

Revision history for this message
ZelinskiyIS (ivze) wrote :

I confirm the problem. In this case (octal)210 character suffers from dash cutting it out. In the duplicate bug report it was shown that octal 201 and 210 suffer from dash cutting them out.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.