zsh-workers
 help / color / mirror / code / Atom feed
* [BUG] Unicode variables can be exported and are exported metafied
@ 2014-12-18 18:19 ZyX
  2014-12-18 19:29 ` Peter Stephenson
  0 siblings, 1 reply; 14+ messages in thread
From: ZyX @ 2014-12-18 18:19 UTC (permalink / raw)
  To: zsh-workers

Consider the following input (zsh -f, UTF-8 locale):

zyx-desktop% ус=1
zyx-desktop% export ус
zyx-desktop% env | grep '=1' | grep '^[^A-Z]'
у�с=1
zyx-desktop% env | grep '=1' | grep '^[^A-Z]' | hexdump -C
00000000  d1 83 a3 d1 81 3d 31 0a                           |.....=1.|
00000008
zyx-desktop% echo ус=1 | hexdump -C
00000000  d1 83 d1 81 3d 31 0a                              |....=1.|
00000007

You see here that variable named `ус` can be exported (not sure whether it is a bug or not), but its 0x83 byte which is the last byte of the first unicode codepoint that forms the variable name represented as UTF-8 is using zsh `Meta` escape in the `env` output (which clearly is a bug assuming the fact that unicode variable is exported is not).


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

end of thread, other threads:[~2014-12-20 10:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-18 18:19 [BUG] Unicode variables can be exported and are exported metafied ZyX
2014-12-18 19:29 ` Peter Stephenson
2014-12-18 19:47   ` Peter Stephenson
2014-12-18 19:58     ` Bart Schaefer
2014-12-18 20:09       ` Peter Stephenson
     [not found]       ` <54933513.6010501@case.edu>
2014-12-18 20:20         ` Fwd: " Bart Schaefer
2014-12-19  9:29       ` Christoph (Stucki) von Stuckrad
2014-12-19 18:17       ` Christoph (Stucki) von Stuckrad
2014-12-19 20:13         ` Павлов Николай Александрович
2014-12-19 21:21         ` Peter Stephenson
2014-12-19 22:44           ` ZyX
2014-12-20  0:13             ` Stephane Chazelas
2014-12-20  9:27               ` ZyX
2014-12-20 10:08                 ` Stephane Chazelas

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).