Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Quoting problem and crashes with ${(#)var}



On Feb 10, 10:08pm, Peter Stephenson wrote:
}
} Bart Schaefer wrote:
} > With zsh -f from the latest CVS as of 2007-02-10 10:28 AM PST:
} > 
} > torch% for x in {1..255}; echo -n ${(#)x}; echo ''
} 
} I think this is it, but shout if you can see any problems left...

It doesn't crash any more.  I'm a bit puzzled, given this test ...

}      if (isset(MULTIBYTE) && ires > 127) {

... why ${(V)x} for x in 128 through 159 display as \u0080 through
\u009f, but then 160 through 255 are treated as directly printable.

Furthermore, if I run with LANG=C I get

% for x in {1..254}; h[x]=${(V#)x}
zsh: character not in range

That seems wrong.  It does the right thing if "unsetopt multibyte"
is also in effect, but why should I have to explicitly do so?



Messages sorted by: Reverse Date, Date, Thread, Author