Date: Fri, 03 Sep 2010 11:46:00 +0200
From: Andreas Röhler<andreas.roehler@easy-emacs.de>
CC: bug-gnu-emacs@gnu.org
The most probable reason for Emacs not to decode the file correctly
(as UTF-8) is that the file includes some bytes that are invalid UTF-8
sequences. What happens if you force UTF-8 with "C-x RET c" before
visiting the file with "C-x C-f"?
All fine at the first glance than.
However, re-opening the newly saved buffer repeats the wrong display.
Sure, because the problem that caused Emacs to decode the file as
raw-text is still in the file.
Also when saving, it always prompts for coding-system, suggests raw-text
first.
Expected, since there are problematic characters in the file. Try
this:
M-: (unencodable-char-position (point-min) (point-max) 'utf-8) RET
It should show you the first position in the buffer where you have a
character that cannot be encoded by UTF-8. If all the characters can
be encoded by UTF-8, this will evaluate to nil.