[Top][All Lists]

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

Re: ISO-8859-1 encoded file names and UTF-8

From: Eli Zaretskii
Subject: Re: ISO-8859-1 encoded file names and UTF-8
Date: Sat, 08 Mar 2003 19:06:54 +0200

> From: Karl Eichwalder <address@hidden>
> Date: Sat, 08 Mar 2003 11:05:41 +0100
> file-name-coding-system's value is nil
> *Coding system for encoding file names.
> If it is nil, `default-file-name-coding-system' (which see) is used.
> I did not set it.

And what is the value of `default-file-name-coding-system'?  If it's
anything but `utf-8', please try setting `file-name-coding-system' to
`utf-8' and see if that helps.

> Some days before I observed that Emacs "auto-corrects" broken .po
> files; the broken files are declared as UTF-8 and containing those
> codes and additionally some iso-8859-1 got mixed in by accident.

Sorry, I'm not sure I understand the last part of this sentence
correctly; if I didn't, what's below might not make any sense.

IIUC, Emacs sometimes decides that *.po files which contain characters
from different encodings are encoded in UTF-8.  If that's so, I think
it's because you made utf-8 your preferred encoding (IIRC, that's what
Emacs does when it sees that your locale uses UTF-8).

> Emacs
> displays those wrong characters "correctly" -- this is somehow
> "user-friendly" but nervertheless highly confusing.

What does Emacs say if you go to one of those ``wrong'' characters
and type "C-u C-x ="?  Are they treated as eight-bit-* characters?
If so, Emacs displays them with the proper glyphs because your fonts
are set in a way that fits Latin-1.

> At least please add a special background to those auto-corrected
> characters.

This would contradict the whole purpose of a multilingual Emacs: it is
meant to seamlessly display characters from different character sets
without any special effects.  How can Emacs know that in this
particular case, you want it to display different character sets

I believe that if such a feature is added, it must be driven by
user-level settings.  For example, users could define a list of
character sets or codepoints which they don't expect to see in their
buffers, and Emacs will then flag characters from those sets with some
visual cue.  It's even possible that you can do that yourself right
now by using hi-lock.el or something similar, since IIRC regular
expressions can be used to express character categories.

reply via email to

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