Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: mangling of non-ascii char in prompt
- X-seq: zsh-workers 22161
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: mangling of non-ascii char in prompt
- Date: Thu, 12 Jan 2006 18:23:47 -0800
- In-reply-to: <20060112022950.GA24042@xxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20060112022950.GA24042@xxxxxxxxxxx>
On Wed, Jan 11, 2006 at 09:29:50PM -0500, Clint Adams wrote:
> % LANG=hr_HR.UTF-8
> % PS1="%D{%a}%# "
The problem appears to be that the UTF-8 string coming from %D{%a} is
not being metafied, so zputs() is outputting the string wrong. The
above PS1 setting on a Thursday results in this 4-char string being
assigned to lpromptbuf:
\304\254et
The second character does not pass the itok() test, so it is skipped,
mangling the output.
If I assign the above 4-character string directly to PS1 via a variable,
the second character is properly metafied:
\304\203\254et
And the string outputs correctly.
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author