zsh-workers
 help / color / mirror / code / Atom feed
* Bug when $USERNAME is cyryllic
@ 2023-10-01  5:04 Максим Щербаков
  2023-10-01  7:04 ` Ellenor Bjornsdottir
  2023-10-01 18:05 ` Bart Schaefer
  0 siblings, 2 replies; 8+ messages in thread
From: Максим Щербаков @ 2023-10-01  5:04 UTC (permalink / raw)
  To: zsh-workers

[-- 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 --]

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

end of thread, other threads:[~2023-10-02 10:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-01  5:04 Bug when $USERNAME is cyryllic Максим Щербаков
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

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