From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9656 invoked by alias); 18 Dec 2014 18:25:38 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34004 Received: (qmail 2896 invoked from network); 18 Dec 2014 18:25:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, T_FSL_HELO_BARE_IP_2 autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1418926766; bh=yfOkfB0/37zdpU7KRk1Wu7F+BxRiIBuHxzFx0dzNrXY=; h=From:To:Subject:Date; b=NATADHh840J3r6xMV1f5wDEBCnYicfRq0sdBtSZHdfIlBQyHc/+d3NgIo6Fhy6HAb 4BCviffvdbHI/kghzVPB0j+SlI06g4EjndfnR90DxhPCRXSkkW0TmcgMDyvlpPQJSF 6Ss2wA0tTCeH9CJFY6GhdO+wExKrIg/tfdvSbbbk= From: ZyX To: zsh-workers Subject: [BUG] Unicode variables can be exported and are exported metafied MIME-Version: 1.0 Message-Id: <1054131418926765@web2o.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 18 Dec 2014 21:19:25 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 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).