help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Garbage display when NULL in file


From: Eli Zaretskii
Subject: Re: Garbage display when NULL in file
Date: Sun, 08 Mar 2009 21:15:25 +0200

> Date: Sun, 8 Mar 2009 08:08:56 -0700 (PDT)
> From: Gregory Sharp <gregsharp.geo@yahoo.com>
> 
> 
> > > In my current debian emacs (22.2.1), emacs seems to be incorrectly
> > > detecting the codeset for files with mixed ascii/data.  The problem
> > > is that I get a garbage display (squares, kanji, etc.).  How can
> > > I tell emacs not to detect the codeset (or revert to ascii/utf8
> > > after it autodetects)?
> > 
> >   C-x RET c us-ascii RET C-x C-x your-file RET
> > 
> > Does this do what you want? 
> 
> Yes!  Thank you for the hint.  The following also works:
> 
>   C-x RET c utf-8 RET C-x C-f your-file RET
> 
> Why doesn't emacs use utf-8 (my locale codeset) for this file?  

Probably because the file includes some data that looks like encoded
Far-Eastern characters.  The locale's encoding is just the preferred
one, but if there are strong signs of a different encoding, Emacs will
use that.

> Can I make this behavior the default?

What, you want every single file be read as UTF-8?  I don't recommend
that.




reply via email to

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