* Are completion and prompt expansion 8-bit clean?
@ 1997-06-23 17:57 Alain Caron
1997-06-23 21:15 ` Zefram
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Alain Caron @ 1997-06-23 17:57 UTC (permalink / raw)
To: zsh-workers
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 714 bytes --]
Hi everyone,
Being a francophone, I like using filenames with french characters.
I usually have no problem with it except in two situations.
The first one is with completion:
touch élément1 élément2
ls é<TAB> (expands into)
ls élément<TAB> (lists \M-il\Miment1 \M-il\M-iment2)
The second one is with prompt expansion:
PS1="%~ %h> "
mkdir élément
cd élément
The prompt is
\M-il\M-iment 4>
instead of
élément 4>
As far as I can tell, these are the only cases where characters with
the 8th bit set are not printed correctly.
I have seen this behaviour in zsh-3.0.2 and zsh-3.1.2
Regards,
Alain Caron
Sanga Research Corporation
alainc@sangacorp.com
514-288-4498 ext. 225
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Are completion and prompt expansion 8-bit clean?
1997-06-23 17:57 Are completion and prompt expansion 8-bit clean? Alain Caron
@ 1997-06-23 21:15 ` Zefram
1997-06-23 22:27 ` Bart Schaefer
1997-06-24 6:21 ` Andrej Borsenkow
1997-06-24 7:43 ` Peter Stephenson
1997-06-26 3:00 ` raul segura acevedo
2 siblings, 2 replies; 6+ messages in thread
From: Zefram @ 1997-06-23 21:15 UTC (permalink / raw)
To: alainc; +Cc: zsh-workers
Alain Caron wrote:
>Subject: Are completion and prompt expansion 8-bit clean?
In one sense, yes: they can handle 8-bit data. In fact, they can handle
arbitrary binary data. In another sense, no: they do not treat all 8-bit
data as printable, even when the display will interpret them as Latin-1
or whatever. Unfortunately, Unix does not provide a way to find out
what characters are printable on a particular display device, so we have
to choose in the source which characters zsh will treat as printable.
No choice can be right for all displays; the current choice is a safe one.
The bug is in Unix; please send the bug report to K.Thompson and
D.Ritchie, twenty years ago. This bug will be fixed in a future OS[1].
-zefram
[1] If I ever find the time to write the OS I've been planning, this is
one of the things that will be fixed. Character set and printability
are a function of the tty.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Are completion and prompt expansion 8-bit clean?
1997-06-23 21:15 ` Zefram
@ 1997-06-23 22:27 ` Bart Schaefer
1997-06-24 6:21 ` Andrej Borsenkow
1 sibling, 0 replies; 6+ messages in thread
From: Bart Schaefer @ 1997-06-23 22:27 UTC (permalink / raw)
To: Zefram; +Cc: zsh-workers
On Jun 23, 10:15pm, Zefram wrote:
> Subject: Re: Are completion and prompt expansion 8-bit clean?
>
> In one sense, yes: they can handle 8-bit data. In fact, they can handle
> arbitrary binary data. In another sense, no: they do not treat all 8-bit
> data as printable, even when the display will interpret them as Latin-1
> or whatever. Unfortunately, Unix does not provide a way to find out
> what characters are printable on a particular display device, so we have
> to choose in the source which characters zsh will treat as printable.
Sounds like a job for a module ... supply several localized tty-output
modules, and select one to load based on $TERM or a capability of $TERM
or some other environment setting ($TERM combined with $LANG, perhaps).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Are completion and prompt expansion 8-bit clean?
1997-06-23 21:15 ` Zefram
1997-06-23 22:27 ` Bart Schaefer
@ 1997-06-24 6:21 ` Andrej Borsenkow
1 sibling, 0 replies; 6+ messages in thread
From: Andrej Borsenkow @ 1997-06-24 6:21 UTC (permalink / raw)
To: Zefram; +Cc: alainc, zsh-workers
On Mon, 23 Jun 1997, Zefram wrote:
> Alain Caron wrote:
> >Subject: Are completion and prompt expansion 8-bit clean?
>
> In one sense, yes: they can handle 8-bit data. In fact, they can handle
> arbitrary binary data. In another sense, no: they do not treat all 8-bit
> data as printable, even when the display will interpret them as Latin-1
> or whatever. Unfortunately, Unix does not provide a way to find out
> what characters are printable on a particular display device, so we have
> to choose in the source which characters zsh will treat as printable.
> No choice can be right for all displays; the current choice is a safe one.
>
> The bug is in Unix; please send the bug report to K.Thompson and
> D.Ritchie, twenty years ago. This bug will be fixed in a future OS[1].
>
Sorry? What about LANG and LC_CTYPE? They existed long ago.
I don't know, which OS is in use; but check your LANG/LC_CTYPE/LC_ALL
settings - they should be appropriate for French locale. If it doesn't
help, it your OS (probably, implementation of ctype functions or
setlocale()) that is broken.
BTW it is documeneted in zshparam(1) - at least for 3.0.4 and 3.1.2.
-------------------------------------------------------------------------
Andrej Borsenkow Fax: +7 (095) 252 01 05
SNI ITS Moscow Tel: +7 (095) 252 13 88
NERV: borsenkow.msk E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Are completion and prompt expansion 8-bit clean?
1997-06-23 17:57 Are completion and prompt expansion 8-bit clean? Alain Caron
1997-06-23 21:15 ` Zefram
@ 1997-06-24 7:43 ` Peter Stephenson
1997-06-26 3:00 ` raul segura acevedo
2 siblings, 0 replies; 6+ messages in thread
From: Peter Stephenson @ 1997-06-24 7:43 UTC (permalink / raw)
To: alainc, zsh-workers
Alain Caron wrote:
> Being a francophone, I like using filenames with french characters.
> I usually have no problem with it except in two situations.
If this is any help, I've now set
LC_ALL=en_US
for my X environment and ISO-8859-1 characters are appearing OK
(setting LC_CTYPE would have done), which they didn't in the default
locale. The setup here is a bit stingy with locales, there's only the
two. mileage/milage [i.e., your mileage may vary].
I may add some such suggestion to the FAQ --- if anyone has better
suggestions for particular machines, please mail me.
--
Peter Stephenson <pws@ifh.de> Tel: +49 33762 77366
WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Are completion and prompt expansion 8-bit clean?
1997-06-23 17:57 Are completion and prompt expansion 8-bit clean? Alain Caron
1997-06-23 21:15 ` Zefram
1997-06-24 7:43 ` Peter Stephenson
@ 1997-06-26 3:00 ` raul segura acevedo
2 siblings, 0 replies; 6+ messages in thread
From: raul segura acevedo @ 1997-06-26 3:00 UTC (permalink / raw)
To: Alain Caron; +Cc: zsh-workers
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=US-ASCII, Size: 697 bytes --]
On Mon, 23 Jun 1997, Alain Caron wrote:
> Being a francophone, I like using filenames with french characters.
> I usually have no problem with it except in two situations.
> The first one is with completion:
> touch élément1 élément2
> ls é<TAB> (expands into)
> ls élément<TAB> (lists \M-il\Miment1 \M-il\M-iment2)
use "nlsinfo" to see which "locales" are installed in your
machine, set CTYPE to an iso88591 one, for example
export LC_CTYPE=english.iso88591
--
raul segura acevedo Chemistry Institute raul@hplara.iquimica.unam.mx
......................................................................
and god typed
M-x let-there-be-light
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1997-06-26 3:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-23 17:57 Are completion and prompt expansion 8-bit clean? Alain Caron
1997-06-23 21:15 ` Zefram
1997-06-23 22:27 ` Bart Schaefer
1997-06-24 6:21 ` Andrej Borsenkow
1997-06-24 7:43 ` Peter Stephenson
1997-06-26 3:00 ` raul segura acevedo
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).