Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug when $USERNAME is cyryllic



Tested both patches:

    env -i LANG=C =zsh-5.9.0.1-dev -fc 'cd; echo "$USERNAME | ${(%):-%n} | $LOGNAME"'

Now results in:

    Студент | Студент | Ѓ�ту�дент

USERNAME and %n works, but LOGNAME is broken now (both in C and C.UTF-8 locales)


Btw, zcompile now works just fine

вс, 1 окт. 2023 г., 21:05 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>:
On Sat, Sep 30, 2023 at 10:05 PM Максим Щербаков
<herobrine135111@xxxxxxxxx> wrote:
>
> As we can see, $LOGNAME is fine, but $USERNAME and %n are bad.

Patch appended.

As mentioned in another thread, this presumes that it's harmless to
metafy something that's already metafied.  If that's not true then the
patch will fix USERNAME but break LOGNAME.

Aside:  If USE_GETPWUID is not defined and DISABLE_DYNAMIC_NSS is also
defined, then both USERNAME and LOGNAME will be empty.

> zcompile: can't write zwc file: /home/Студент/.zc/.zcompdump-5.9.zwc

The opposite problem.



Messages sorted by: Reverse Date, Date, Thread, Author