[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: file coding problem for .emacs file
From: |
Eli Zaretskii |
Subject: |
Re: file coding problem for .emacs file |
Date: |
Thu, 23 Jun 2011 10:17:22 +0300 |
> Date: Thu, 23 Jun 2011 09:49:03 +0900
> From: ishi soichi <soichi777@gmail.com>
>
> Hi. I normally set Emacs to that it can show Japanese characters, and it was
> fine until yesterday.
>
> The comments in .emacs file are in Japanese. And these comments have
> suddenly become corrupt. All Japanese fonts are messed up and unable to
> read
Are the problems only with .emacs, or with visiting any file that has
Japanese text in it?
> 1. commented the entire .emacs file. But no change. The mode-line shows
> "-=:-- .emacs " so file-coding system must be wrong.
The `=' means .emacs was read as a binary file, with no encoding
conversions. That would explain why you see it garbled.
> 2. I uncommented a part of the regular setting,
>
> (set-language-environment 'Japanese)
> (prefer-coding-system 'utf-8)
>
> and rebooted Emacs. But it still gives the same problem.
>
> 3. I implemented "set-buffer-file-coding-system" (default was nil). Then I
> changed that to shift-jis and utf-8. It does no improve the situation at
> all.
What happens if you force Emacs to decode the file as UTF-8? Like
this:
C-x RET c utf-8 RET C-x C-f ~/.emacs RET
Does this show your .emacs correctly?
Also, try starting Emacs with "emacs -Q", then manually visit ~/.emacs
and see if it still displays garbled.