Subject: Re: bug#6974: Emacs doesn't like Swedish ä (on w32)

From: Eli Zaretskii <[email-masked]>
Date: Sat, 04 Sep 2010 12:27:09 +0300

> Date: Sat, 04 Sep 2010 10:29:09 +0200
> From: Andreas Röhler <[email-masked]>
> CC: [email-masked]
> 
> >>> \240 (autoload 'muse-mode "muse-mode" "" t)
> >
> > You have literal \240 characters in the file, which are invalid UTF-8
> > sequences.
> >
> 
> Thanks a lot for your efforts.
> Question remains how that might happen.
> 
> Why Emacs could not prevent that.

I have no idea, but you should watch very closely the first time when
Emacs says it cannot save the file and offers you to select an
encoding.  At that moment, the contents of the buffer should be
analyzed to find the unencodable characters, and try to figure out
where did they come from.  If you just accept one of the encodings
offered by Emacs and save the file, it's too late.

> See too possible causes
> 
> - chars from a auto-saved-file

Cannot be true: Emacs 24 uses UTF-8 for auto-saved-file.

> - something pasted from the net, which had some MS- encoding etc.

Cannot be, if your selection encoding is set up correctly.

> as I didn't see that error for a long time, still suspect Emacs 24 doing 
> something not that clever 23 does.

Maybe, but it's impossible to say unless you show a reproducible
recipe where a valid UTF-8 buffer gets a raw byte \240 inserted into
it.