From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?5ZGC44CA5YWL?= Newsgroups: gmane.emacs.help Subject: Re: about xhtml-mode encoding problem Date: Tue, 10 Jul 2007 01:12:52 +0900 Message-ID: <46925E84.1070107@luxdo.co.jp> References: <469249C1.7080202@luxdo.jp> <9CDB8EBC-92CA-4E16-89B7-A55064C94777@Web.DE> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1184001623 9674 80.91.229.12 (9 Jul 2007 17:20:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2007 17:20:23 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 09 19:20:19 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I7wuI-0004eR-9G for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Jul 2007 19:20:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I7wuF-00022V-Na for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Jul 2007 13:20:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I7vrM-0002s5-O0 for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 12:13:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I7vrJ-0002pN-0L for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 12:13:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I7vrI-0002pA-Tk for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 12:13:08 -0400 Original-Received: from softbank218118058050.bbtec.net ([218.118.58.50] helo=www.luxdo.jp) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I7vrI-000156-3o for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 12:13:08 -0400 Original-Received: from [192.168.11.6] (softbank218118058050.bbtec.net [218.118.58.50]) (authenticated bits=0) by www.luxdo.jp (8.13.1/8.13.1) with ESMTP id l69GCqVx026047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Jul 2007 01:12:53 +0900 User-Agent: Thunderbird 1.5.0.12 (X11/20070604) In-Reply-To: <9CDB8EBC-92CA-4E16-89B7-A55064C94777@Web.DE> X-MIME-Autoconverted: from 8bit to quoted-printable by www.luxdo.jp id l69GCqVx026047 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Mon, 09 Jul 2007 13:20:02 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:45563 Archived-At: 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) =20 auto-mode-alist)) (setq auto-mode-alist (cons '("\\.asp$" . nxhtml-mode) =20 auto-mode-alist)) (setq auto-mode-alist (cons '("\\.php$" . nxhtml-mode) =20 auto-mode-alist)) (setq auto-mode-alist (cons '("\\.phtml$" . nxhtml-mode) =20 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=20 > the file that are a valid XHTML comment: > > -*- coding: sjis; > > or insert a > > (prefer-coding-system 'sjis) > > into your ~/.emacs file. More elaborate would be (not sure whether it=20 > 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)) > > --=20 > Greetings > > Pete > > "A mathematician is a machine that turns coffee into theorems." > > > --=20 _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ =E3=83=A9=E3=82=AF=E3=82=B9=E3=83=89=E3=82=A6=E3=80=80=E6=A0=AA=E5=BC=8F=E4= =BC=9A=E7=A4=BE =E5=91=82=E3=80=80=E5=85=8B=EF=BC=88=E3=83=AD=E3=80=80=E3=82=B3=E3=82=AF=EF= =BC=89 =E3=80=92103-0014=E3=80=80=E6=9D=B1=E4=BA=AC=E9=83=BD=E4=B8=AD=E5=A4=AE=E5= =8C=BA=E6=97=A5=E6=9C=AC=E6=A9=8B=E8=9B=8E=E6=AE=BB=E7=94=BA1-5-4 =E5=A1=A9= =E7=94=B0=E3=83=93=E3=83=AB4F HP: http://www.luxdo.co.jp TEL:03-3249-3405 FAX:03-5641-1955 E-mail: lu@luxdo.co.jp _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/