The Greek letter "rho" is considered as two letters
$ touch ρ $ ls ? ls: cannot access ?: No such file or directory $ ls ?? ρ
It happens to some utf-8 characters, but not for all of them. This might be related:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532302
Please CC me if possible, I'm not on the list.
Kind regards,
Alkis Georgopoulos
Erm actually this problem happens with all utf8 characters, i.e. dash does not properly take utf8 characters into account when expanding "?".
$ touch appétit $ ls app?tit ls: cannot access app?tit: No such file or directory $ ls app??tit appétit
I'll send another mail about the greek rho problem which occurs only with redirections.
Re: ? doesn't match non-ascii characters
I've changed the title because it was misleading (was: "The Greek letter "rho" is considered as two letters").
Repeating the problem,
$ touch appétit $ ls app?tit ls: cannot access app?tit: No such file or directory $ ls app??tit appétit
I.e. double-byte utf-8 characters need two "?" to be matched., triple-byte utf-8 characters (e.g. ἀ) need three "?" to be matched etc.
Quoted 8 lines · Alkis Georgopoulos
Erm actually this problem happens with all utf8 characters, i.e. dash does not properly take utf8 characters into account when expanding "?".
$ touch appétit $ ls app?tit ls: cannot access app?tit: No such file or directory $ ls app??tit appétit
Yes, it seems that dash has zero support for locales. In some ways this is an advantage, as locale support can make things considerably slower and configure/startup scripts don't need it. However, it leads to inconsistent behaviour with other utilities that do support locales.
For FreeBSD's /bin/sh, which is another ash variant, I think some degree of locale support (at least for utf-8) is desirable at some point. This would include changing pattern matching and ${#var}.
I don't know what Herbert Xu thinks about this.
Signature · 1 line
Jilles Tjoelker