From: Ellenor Bjornsdottir <ellenor-zshw@umbrellix.net>
To: zsh-workers@zsh.org, "Максим Щербаков" <herobrine135111@gmail.com>
Subject: Re: Bug when $USERNAME is cyryllic
Date: Sun, 1 Oct 2023 07:04:00 +0000 [thread overview]
Message-ID: <7c495233-52ca-6d8a-c647-3a547c451b84@umbrellix.net> (raw)
In-Reply-To: <816a211e-3907-420e-9c1d-d6489f805d7f@Spark>
[-- Attachment #1: Type: text/plain, Size: 2039 bytes --]
Maksim,
What UNIX are you using where that's a valid username? If Linux, what
distribution?
Not disparaging it, just wondering. I agree that this is not how zsh
should be behaving. Are other shells (e.g. bash, Korn, tcsh) behaving
correctly?
In English, we call the script used in Russia, Ukraine, Belarus, and a
few other countries (including most internal vassals of Russia, as well
as Bulgaria, Serbia (sometimes), Montenegro, Mongolia, Tajikistan, and
until recently Kazakhstan) to write their native languages "Cyrillic",
not "Cyryllic". Your English spelling and grammar is otherwise entirely
acceptable.
Le 1 octobre 2023 05:04:40 UTC, "Максим Щербаков"
<herobrine135111@gmail.com> a écrit :
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):
Студент: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:
mkdir -p '/home/Студент'
env -i LANG=C.UTF-8 zsh -fc 'cd; echo "$USERNAME | ${(%):-%n} |
$LOGNAME"'
I will get:
�т��ент | Ст\M-Q\M-p\M-4ент | Студент
Instead of:
Студент | Студент | Студент
As we can see, _$LOGNAME_ is fine, but _$USERNAME_ and _%n_ are bad.
-----------------------------
Also, probably related, _zcompile_ don't work on cyryllic paths:
touch '/home/Студент/.zc/.zcompdump-5.9'
zcompile '/home/Студент/.zc/.zcompdump-5.9'
Results in:
zcompile: can't write zwc file: /home/Студент/.zc/.zcompdump-5.9.zwc
--
Ellenor Agnes Bjornsdottir (she)
sysadmin umbrellix.net
jabber: ellenor ~on~ umbrellix.net
[-- Attachment #2: Type: text/html, Size: 4482 bytes --]
next prev parent reply other threads:[~2023-10-01 7:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-01 5:04 Максим Щербаков
2023-10-01 7:04 ` Ellenor Bjornsdottir [this message]
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=7c495233-52ca-6d8a-c647-3a547c451b84@umbrellix.net \
--to=ellenor-zshw@umbrellix.net \
--cc=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).