unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: 呂 克 <lu@luxdo.co.jp>
Cc: help-gnu-emacs@gnu.org
Subject: Re: about xhtml-mode encoding problem
Date: Tue, 10 Jul 2007 01:12:52 +0900	[thread overview]
Message-ID: <46925E84.1070107@luxdo.co.jp> (raw)
In-Reply-To: <9CDB8EBC-92CA-4E16-89B7-A55064C94777@Web.DE>

Sorry I had a mistake.
The problem is on  *nxhtml-mode*,not xhtml-mode.

I added these line in my .emacs.
load-file (concat plugin_path "/nxml/autostart.el"))
(setq auto-mode-alist (cons '("\\.jsp$" . nxhtml-mode)        
auto-mode-alist))
(setq auto-mode-alist (cons '("\\.asp$" . nxhtml-mode)        
auto-mode-alist))
(setq auto-mode-alist (cons '("\\.php$" . nxhtml-mode)        
auto-mode-alist))
(setq auto-mode-alist (cons '("\\.phtml$" . nxhtml-mode)      
auto-mode-alist))

(modify-coding-system-alist 'file "\\.jsp\\'" 'sjis)
(add-to-list 'file-coding-system-alist '("\\.jsp\\'" . sjis))
(add-to-list 'file-coding-system-alist '("\\.xhtml\\'" . sjis))
(prefer-coding-system 'sjis)

But I'm sorry to say all of them doesn't work.
when I save the file it become utf-8.
I'm using emacs 22 on linux and windows xp.



Peter Dyballa wrote:
>
> Am 09.07.2007 um 16:44 schrieb lu:
>
>> I want to know How to solve this problem.
>
> You might try to use (file) local variables in the first line(s) of 
> the file that are a valid XHTML comment:
>
>     <comment string> -*- coding: sjis;
>
> or insert a
>
>     (prefer-coding-system 'sjis)
>
> into your ~/.emacs file. More elaborate would be (not sure whether it 
> works)
>
>     (modify-coding-system-alist 'file "\\.xhtml\\'" 'sjis)
>
> or, which works for me with different values:
>
>     (add-to-list 'file-coding-system-alist '("\\.xhtml\\'" . sjis))
>
> -- 
> Greetings
>
>   Pete
>
> "A mathematician is a machine that turns coffee into theorems."
>
>
>


-- 
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ラクスドウ 株式会社
呂 克(ロ コク)
〒103-0014 東京都中央区日本橋蛎殻町1-5-4 塩田ビル4F
HP: http://www.luxdo.co.jp
TEL:03-3249-3405  FAX:03-5641-1955
E-mail: lu@luxdo.co.jp
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

  parent reply	other threads:[~2007-07-09 16:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-09 14:44 about xhtml-mode encoding problem lu
2007-07-09 15:31 ` Peter Dyballa
2007-07-09 16:07   ` lu
2007-07-09 17:08     ` Lennart Borgman (gmail)
2007-07-09 18:00     ` Peter Dyballa
2007-07-09 23:26       ` lu
2007-07-09 23:37       ` about nxhtml-mode " lu
2007-07-11 12:47         ` lu
2007-07-11 13:18           ` Lennart Borgman (gmail)
2007-07-11 14:07             ` lu
2007-07-12 13:56             ` lu
2007-11-25 22:56               ` Lennart Borgman (gmail)
2007-11-26  4:53                 ` Ke Lu
2007-11-26  8:03                   ` Lennart Borgman (gmail)
2007-07-09 16:12   ` 呂 克 [this message]
2007-07-09 17:59     ` about xhtml-mode " Lennart Borgman (gmail)
2007-07-11 14:02       ` lu
2007-07-11 14:41         ` Lennart Borgman (gmail)
     [not found]   ` <mailman.3225.1183997250.32220.help-gnu-emacs@gnu.org>
2007-07-09 16:41     ` B. T. Raven
2007-07-09 23:29       ` lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46925E84.1070107@luxdo.co.jp \
    --to=lu@luxdo.co.jp \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).