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

From: Andreas Röhler <[email-masked]>
Date: Sat, 04 Sep 2010 11:50:01 +0200

Am 04.09.2010 11:27, schrieb Eli Zaretskii:
>> 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.
>

Thanks,

as this file contains just some notes saved, maybe the both last edits
at the top might give some information.

I'm pretty sure everything was fine with the but-last entry below
(setq mon (list ...

Maybe this entry and/or execution it inside did the corruption:

(insert (list (read-from-string (format "%s" α))

(setq mon (list "Januar" "Februar" "März" "April" "Mai" "Juni" "Juli" 
"August" "September" "Oktober"   "November" "Dezember"))
Mai
\,(pop mon)