From: "Максим Щербаков" <herobrine135111@gmail.com>
To: zsh-workers@zsh.org
Subject: Bug when $USERNAME is cyryllic
Date: Sun, 1 Oct 2023 08:04:40 +0300 [thread overview]
Message-ID: <816a211e-3907-420e-9c1d-d6489f805d7f@Spark> (raw)
[-- Attachment #1: Type: text/plain, Size: 1200 bytes --]
Hello, this is the first time I am using mailing lists, don't be mad at me if I do something wrong.
Sorry for errors, English is not my native language.
I found a bug in zsh:
If I add this line to the top of /etc/passwd (before the "root" line, also works with other UIDs):
> quote_type
> Студент:x:0:0:root:/home/Студент:/usr/bin/zsh
After logging in as "root" (so environment will be good, as in this case "root" line is used for login), and running this commands:
> quote_type
> mkdir -p '/home/Студент'
> env -i LANG=C.UTF-8 zsh -fc 'cd; echo "$USERNAME | ${(%):-%n} | $LOGNAME"'
I will get:
> quote_type
> �т��ент | Ст\M-Q\M-p\M-4ент | Студент
Instead of:
> quote_type
> Студент | Студент | Студент
As we can see, $LOGNAME is fine, but $USERNAME and %n are bad.
-----------------------------
Also, probably related, zcompile don't work on cyryllic paths:
> quote_type
> touch '/home/Студент/.zc/.zcompdump-5.9'
> zcompile '/home/Студент/.zc/.zcompdump-5.9'
Results in:
> quote_type
> zcompile: can't write zwc file: /home/Студент/.zc/.zcompdump-5.9.zwc
[-- Attachment #2: Type: text/html, Size: 2433 bytes --]
next reply other threads:[~2023-10-01 5:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-01 5:04 Максим Щербаков [this message]
2023-10-01 7:04 ` Ellenor Bjornsdottir
2023-10-01 7:17 ` Максим Щербаков
2023-10-01 18:05 ` Bart Schaefer
2023-10-01 18:54 ` Максим
2023-10-01 20:35 ` Bart Schaefer
2023-10-02 4:50 ` Максим
2023-10-02 10:28 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=816a211e-3907-420e-9c1d-d6489f805d7f@Spark \
--to=herobrine135111@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).