From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: The text coding sytem for Emacs Date: Fri, 06 Nov 2009 10:19:48 +0200 Message-ID: <83aaz0awuz.fsf@gnu.org> References: <833a4ttdik.fsf@ymail.invalid> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1257495707 26894 80.91.229.12 (6 Nov 2009 08:21:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Nov 2009 08:21:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 06 09:21:40 2009 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 1N6K4g-0005MI-2w for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Nov 2009 09:21:39 +0100 Original-Received: from localhost ([127.0.0.1]:57004 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6K4f-0007Pv-51 for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Nov 2009 03:21:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N6K3f-0007J8-6r for help-gnu-emacs@gnu.org; Fri, 06 Nov 2009 03:20:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N6K3a-0007Ha-Tu for help-gnu-emacs@gnu.org; Fri, 06 Nov 2009 03:20:34 -0500 Original-Received: from [199.232.76.173] (port=50359 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6K3a-0007HT-ND for help-gnu-emacs@gnu.org; Fri, 06 Nov 2009 03:20:30 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:61409) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N6K3a-0000k2-BZ for help-gnu-emacs@gnu.org; Fri, 06 Nov 2009 03:20:30 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0KSO00400HQ0L300@a-mtaout23.012.net.il> for help-gnu-emacs@gnu.org; Fri, 06 Nov 2009 10:19:40 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.70.37.193]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KSO004V8HSR8110@a-mtaout23.012.net.il> for help-gnu-emacs@gnu.org; Fri, 06 Nov 2009 10:19:40 +0200 (IST) In-reply-to: <833a4ttdik.fsf@ymail.invalid> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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:69536 Archived-At: > From: Water Lin > Date: Thu, 05 Nov 2009 19:30:27 +0800 > > > I re-install my Windows XP system. But after I start Emacs, it treats my > text file as iso-latin-1-unix. But actually the coding system should be > utf-8. So Emacs shows the text as a mess. What version of Emacs is that? With Emacs 23.1 I think this shouldn't happen (barring some rare bug). If you don't have Emacs 23.1, can you upgrade? > How can I let Emacs to treat text file as UTF-8 by default? For this file only, or for all files? For the latter `(prefer-coding-system 'utf-8)' in your .emacs should do, I think. For the former, you can add a `coding:' cookie to the file.