zsh-workers
 help / color / mirror / code / Atom feed
* invalid characters and multi-byte [x-y] ranges
@ 2015-09-02 23:07 Stephane Chazelas
  2015-09-03  9:00 ` Peter Stephenson
  0 siblings, 1 reply; 8+ messages in thread
From: Stephane Chazelas @ 2015-09-02 23:07 UTC (permalink / raw)
  To: Zsh hackers list

Hello,

is this (in a UTF-8 locale):

$ zsh -c $'[[ \xcc = [\uaa-\udd] ]]' && echo yes
yes

expected or desirable? I know I can't expect much since \xcc is
not a valid character, but I wouldn't have expected it to match
[\uaa-\udd] there.

Same for:

$ zsh -c $'[[ \xcc = [[:alpha:]] ]]' && echo yes
yes

It seems \xcc is treated as U+00CC here (which in UTF-8 is
\xc3\x8c)

$ zsh -c $'[[ \xcc = \ucc ]]' && echo yes
$ zsh -c $'[[ \xcc = [\ucc] ]]' && echo yes
yes

-- 
Stephane


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-09-04 15:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-02 23:07 invalid characters and multi-byte [x-y] ranges Stephane Chazelas
2015-09-03  9:00 ` Peter Stephenson
2015-09-03 10:09   ` Stephane Chazelas
2015-09-03 14:18     ` Peter Stephenson
2015-09-04 10:53       ` Ismail Donmez
2015-09-04 11:47         ` Peter Stephenson
2015-09-04 12:35           ` Peter Stephenson
2015-09-04 15:02             ` Ismail Donmez

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).