From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Hou, Ruoyu" Newsgroups: gmane.emacs.help Subject: Re: Questions on charset encoding detection and keyboard layout Date: Fri, 11 Dec 2009 13:42:39 +0800 Message-ID: <4B21DBCF.1020607@gmail.com> References: <4B2108C2.8000506@gmail.com> <83k4wu8xdy.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1260510209 7577 80.91.229.12 (11 Dec 2009 05:43:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Dec 2009 05:43:29 +0000 (UTC) To: Emacs Mailing List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 11 06:43:21 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 1NIyHg-0006kb-Q3 for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Dec 2009 06:43:21 +0100 Original-Received: from localhost ([127.0.0.1]:37702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIyHg-0006Up-Oy for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Dec 2009 00:43:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIyHF-0006Tk-DP for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 00:42:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIyHA-0006RF-9V for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 00:42:52 -0500 Original-Received: from [199.232.76.173] (port=35900 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIyHA-0006RB-3f for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 00:42:48 -0500 Original-Received: from mail-yx0-f191.google.com ([209.85.210.191]:61579) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NIyHA-00017U-6x for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 00:42:48 -0500 Original-Received: by yxe29 with SMTP id 29so1497740yxe.14 for ; Thu, 10 Dec 2009 21:42:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Tuu61rgPPSOoGtCh7q78orgLVHErfqOcIUBdVWrps+w=; b=K/ua4dpGAqP0Zaxty3/UV75l83jtBB5bqpMyAtQ1MFCQw7AkaBYjGDVCdrGxWRGT0m Px6OOZz2pBb/2yYm92sZ/UwI36FSvpwbPQz+PJRsqRaEDzeXI3smpfXYg9RvYL8AIlXw iSuzi5OMK1JB8Fy4vVqv84p4G2JX14IrQsP/w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=vuG2gfPF81+7StH21Lx2WAirz9GCakpimcw0EjbnfzJz5UNs28/3LP4fzetUE42VUJ yAfNYiQfS18XyEIL2oCI7thOOtsbSEuewBicR7JF9nRGNzdM4yZlfTCpPqtXcrpMAnAV hZrhxYSI4C0YLKGFVERf8pJxuVv67oNE5WSyo= Original-Received: by 10.150.20.27 with SMTP id 27mr1828091ybt.42.1260510167269; Thu, 10 Dec 2009 21:42:47 -0800 (PST) Original-Received: from ?192.168.1.105? ([219.228.126.137]) by mx.google.com with ESMTPS id 4sm730325yxd.70.2009.12.10.21.42.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 10 Dec 2009 21:42:46 -0800 (PST) User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: <83k4wu8xdy.fsf@gnu.org> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:70583 Archived-At: Dear Zaretskii, I tried the tip you gave me, but now I've got my GBK-encoded files unreadable. How you would solve the problem? Moreover, as I mentioned in the previous post, how could I set a prefer-coding-system without beforehand knowledge about the encoding I am supposed to encounter? Thanks for your help. Regards, Eli Zaretskii wrote: >> Date: Thu, 10 Dec 2009 22:42:11 +0800 >> From: "Hou, Ruoyu" >> >> 1. My working environment involves handling documents with major eastern >> Asian characters in different encodings(GB2312, GB18030, BIG5, GBK, >> UTF-8, Shift-JIS, EUC-JP, ISO-2022-JP). My language environment was set >> as UTF-8, because I want all the documents *I create* saved as UTF-8, >> and properly display/edit/save other file in different encodings without >> changing the raw encodings. I noticed that my emacs was not properly >> recognizing documents encoded with euc-jp, so I have to manually set it >> every time I encounter such documents. Is there any configurations I >> could tweak to accurately auto-detect and display the file encodings I >> mentioned above? > > Try putting this in your ~/.emacs init file (and restart Emacs after > that): > > (prefer-coding-system 'euc-jp) > > > -- Hou, Ruoyu Laboratory of Reproductive & Stem Cell Biology, College of Life Science & Biotech., Shanghai Jiao Tong University, Shanghai 200240, P.R.China.