zsh-workers
 help / color / mirror / code / Atom feed
* Shared history and locales (charmap)
@ 2007-12-11 13:54 Vincent Lefevre
  2007-12-11 13:59 ` Mikael Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Lefevre @ 2007-12-11 13:54 UTC (permalink / raw)
  To: zsh-workers

Another problem: When using different locales (e.g. ISO-8859-1 and
UTF-8) and a shared history, zsh isn't able to correctly retrieve
the command, as locale information isn't stored in the history file.

IMHO, there should be an option so that the history is stored and
retrieved in UTF-8. And if for some reason, zsh finds an invalid
UTF-8 sequence in the history, it should use the current charmap
as a fallback. In practice, this would allow zsh to continue to
work with old history files.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


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

* Re: Shared history and locales (charmap)
  2007-12-11 13:54 Shared history and locales (charmap) Vincent Lefevre
@ 2007-12-11 13:59 ` Mikael Magnusson
  2007-12-11 14:18   ` Vincent Lefevre
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Magnusson @ 2007-12-11 13:59 UTC (permalink / raw)
  To: zsh-workers

On 11/12/2007, Vincent Lefevre <vincent@vinc17.org> wrote:
> Another problem: When using different locales (e.g. ISO-8859-1 and
> UTF-8) and a shared history, zsh isn't able to correctly retrieve
> the command, as locale information isn't stored in the history file.
>
> IMHO, there should be an option so that the history is stored and
> retrieved in UTF-8. And if for some reason, zsh finds an invalid
> UTF-8 sequence in the history, it should use the current charmap
> as a fallback. In practice, this would allow zsh to continue to
> work with old history files.

I think it should insert any invalid bytes as a $'\abc' sequence. Just
because I'm running
a terminal in another locale doesn't mean all my files were renamed...

-- 
Mikael Magnusson


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

* Re: Shared history and locales (charmap)
  2007-12-11 13:59 ` Mikael Magnusson
@ 2007-12-11 14:18   ` Vincent Lefevre
  0 siblings, 0 replies; 3+ messages in thread
From: Vincent Lefevre @ 2007-12-11 14:18 UTC (permalink / raw)
  To: zsh-workers

On 2007-12-11 14:59:33 +0100, Mikael Magnusson wrote:
> On 11/12/2007, Vincent Lefevre <vincent@vinc17.org> wrote:
[...]
> > IMHO, there should be an option so that the history is stored and
> > retrieved in UTF-8. And if for some reason, zsh finds an invalid
> > UTF-8 sequence in the history, it should use the current charmap
> > as a fallback. In practice, this would allow zsh to continue to
> > work with old history files.
> 
> I think it should insert any invalid bytes as a $'\abc' sequence.
> Just because I'm running a terminal in another locale doesn't mean
> all my files were renamed...

Well, this should be controlled by an option, and possibly shell
functions as hooks to be able to do smart recoding. The problem is
that one has basically two kinds of arguments: filenames and user
text. For user text, it sometimes makes sense to recode the argument.

BTW, due to these encoding problems, I never put non-ASCII characters
in my filenames. So, for me, this is almost only user text.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


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

end of thread, other threads:[~2007-12-11 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-11 13:54 Shared history and locales (charmap) Vincent Lefevre
2007-12-11 13:59 ` Mikael Magnusson
2007-12-11 14:18   ` Vincent Lefevre

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