From: "lu@luxdo.jp" <lu@luxdo.jp>
To: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: about xhtml-mode encoding problem
Date: Wed, 11 Jul 2007 23:02:22 +0900 [thread overview]
Message-ID: <4694E2EE.3000907@luxdo.jp> (raw)
In-Reply-To: <46927783.8050506@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2103 bytes --]
Lennart Borgman (gmail) wrote:
> 呂 克 wrote:
>> 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.
>
>
> Thanks, that was why I asked you which major modes you are using.
>
> nxhtml-mode is derived from nxml-mode and I think it handles coding
> systems a bit differently. Look at write-contents-functions in the
> buffer. I think it contains nxml-prepare-to-save. That function tries
> to get the coding system to use from the XML header if the coding
> system has not been specified explicitly for the buffer through
> buffer-file-coding-system.
>
> Is there an XML header in the buffer in your case? What coding system
> does it specify?
>
>
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
I'm Sorry to reply late.
> Is there an XML header in the buffer in your case? What coding system
> does it specify?
I don't know what's the meaning.
There is a xml menu.but I don't know What coding system does it specify?
Please see the attachment.
the first's file coding system is shift-jis(this is a s: at the left bottom)
but when I use C-x C-s,it because u: (utf)
I don't know why.
[-- Attachment #2: nxhtml2(after_save).png --]
[-- Type: image/png, Size: 106213 bytes --]
[-- Attachment #3: nxhtml1.png --]
[-- Type: image/png, Size: 109757 bytes --]
[-- Attachment #4: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
next prev parent reply other threads:[~2007-07-11 14:02 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 ` about xhtml-mode " 呂 克
2007-07-09 17:59 ` Lennart Borgman (gmail)
2007-07-11 14:02 ` lu [this message]
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=4694E2EE.3000907@luxdo.jp \
--to=lu@luxdo.jp \
--cc=help-gnu-emacs@gnu.org \
--cc=lennart.borgman@gmail.com \
/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).