From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "lu@luxdo.jp" Newsgroups: gmane.emacs.help Subject: Re: about xhtml-mode encoding problem Date: Tue, 10 Jul 2007 01:07:15 +0900 Message-ID: <46925D33.9030007@luxdo.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=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1183997328 25981 80.91.229.12 (9 Jul 2007 16:08:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2007 16:08:48 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Peter Dyballa Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 09 18:08:46 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 1I7vn2-0004IU-NZ for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Jul 2007 18:08:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I7vn2-0001j5-3J for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Jul 2007 12:08:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I7vlo-0000ti-Nm for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 12:07:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I7vlm-0000rb-Qw for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 12:07:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I7vlm-0000rQ-JI for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 12:07:26 -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 1I7vll-0008AJ-O4 for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 12:07:26 -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 l69G7GCl025989 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Jul 2007 01:07:18 +0900 User-Agent: Thunderbird 1.5.0.12 (X11/20070604) In-Reply-To: <9CDB8EBC-92CA-4E16-89B7-A55064C94777@Web.DE> X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:45561 Archived-At: I added these line in my .emacs. (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: > > -*- 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." > > >