[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coding systems

From: Eli Zaretskii
Subject: Re: coding systems
Date: Tue, 03 Nov 2009 20:53:50 +0200

> From: Joseph Brenner <address@hidden>
> Date: Mon, 02 Nov 2009 23:23:41 -0800
> > For what use-cases?  Do you type non-ASCII characters?  If so, what
> > ranges of Unicode or character sets do you use?  How often does it
> > happen that you edit an existing file and add to it characters from
> > character sets that were not there in the first place?  Etc., etc.
> >
> > Also, how much data loss are you willing to sustain?
> >
> > IOW, without further details it is impossible to answer your question.
> If it trashed everything but ascii characters, then that'd be my
> problem, given the way I just asked the question.

Sadly, this tells nothing about your typical use-cases.

> However, it would seem to me that I should be able to just tell the
> system to always use latin-1 (or utf-8) when in doubt

There is no doubt.  When Emacs asks you to provide a coding system, it
_knows_for_sure_ it cannot encode the text with any of the encodings
that are hinted by your defaults and the system's setup.  So, if you
setup Emacs to prefer UTF-8, as Peter suggested, and Emacs still pops
the question, it means UTF-8 cannot be used in this case, period.

The only way to never get this question is to have your default
encoding be utf-8-emacs.  (This is the encoding used by Emacs
internally, which extends UTF-8 and Unicode with some codepoints
private to Emacs.)  It's possible that you can also avoid the question
by setting the default to raw-text.  Caveat emptor: doing so may
produce files that only Emacs will be able to display correctly, and
that you may need to specify the encoding explicitly when visiting
files thus saved.

> someone must've been down this road already

Not necessarily.  With Emacs 23, the question pops rather rarely, so I
gather most users aren't annoyed at all.  Which is another reason to
tell more about your plight: if this happens to you more than you are
able to endure, something is probably wrong in your setup.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]