From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wang Lei Newsgroups: gmane.emacs.help Subject: Re: How to change the file encoding Date: Sun, 15 Nov 2009 07:49:46 +0800 Message-ID: <4aff41a5.9413f30a.2b91.29b2@mx.google.com> References: <380eea2a0911121400t3d32bb75jd45c7214bf0b4143@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1258242508 25472 80.91.229.12 (14 Nov 2009 23:48:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Nov 2009 23:48:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 15 00:48: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 1N9SLq-0003Xd-UL for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Nov 2009 00:48:19 +0100 Original-Received: from localhost ([127.0.0.1]:39325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9SLq-0004KK-5y for geh-help-gnu-emacs@m.gmane.org; Sat, 14 Nov 2009 18:48:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N9SLU-0004IV-ID for help-gnu-emacs@gnu.org; Sat, 14 Nov 2009 18:47:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N9SLP-0004Hj-Ry for help-gnu-emacs@gnu.org; Sat, 14 Nov 2009 18:47:56 -0500 Original-Received: from [199.232.76.173] (port=55218 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9SLP-0004Hg-PR for help-gnu-emacs@gnu.org; Sat, 14 Nov 2009 18:47:51 -0500 Original-Received: from mail-pz0-f181.google.com ([209.85.222.181]:33824) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N9SLP-0001nO-Cj for help-gnu-emacs@gnu.org; Sat, 14 Nov 2009 18:47:51 -0500 Original-Received: by pzk11 with SMTP id 11so2754785pzk.14 for ; Sat, 14 Nov 2009 15:47:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:references :mail-followup-to:date:in-reply-to:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=qtKgZ8N9hFiaBeDUEfHoD5qvYnBw88Mfq3YlD6f/xXI=; b=ViRzT3WaVkrnkw8hPAcTJoxpPcKWgl6GFHAzMOm8a6DD4tk0FUpU/O42ZYIR/C28Sp XnGjhCbYQajaIzLY2jPJvZbaJZIH5yaOA/TwT2TZiTGCrOzw88/09mu6fWu+8W7rl9Kn Hwl25ud6VawENY0nEWAJJFd8oZ8H17I2SxAos= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:references:mail-followup-to:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; b=kru+1LukRhJt1dFzbGV5nKJNR2KqkAKrGFMWQpAbvoBI43eZ1Q/Tv0C6BI/cKVXYEu rkNKA75GrfXLBEueYWx+tcYchb9ZC/G4NxO8/U1NOeRmzzbq0Kr3/A1edF5DGK7oXdL5 7lzwyjr1/8c52SvScfVijZbNmXt81Shu+Hh5w= Original-Received: by 10.114.162.5 with SMTP id k5mr1652485wae.10.1258242469732; Sat, 14 Nov 2009 15:47:49 -0800 (PST) Original-Received: from mary ([115.170.210.225]) by mx.google.com with ESMTPS id 20sm430362pzk.1.2009.11.14.15.47.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 14 Nov 2009 15:47:49 -0800 (PST) Mail-Followup-To: help-gnu-emacs@gnu.org In-Reply-To: <380eea2a0911121400t3d32bb75jd45c7214bf0b4143@mail.gmail.com> (=?utf-8?B?IuWkpwnnhooiJ3M=?= message of "Fri, 13 Nov 2009 06:00:56 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) 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:69745 Archived-At: =E5=A4=A7=E7=86=8A writes: > For work reason, I always process some kinds of file encodings: gbk, > shift-jis, utf8, utf16, ... > By vim, after open or new a file, I can use ": e ++enc=3Dencoding" or > ": w ++enc=3Dencoding" to chang the file encoding which is different > from the default setting. > How do it under emacs, a single command or a package? > > Thanks! Check this out, C-x RET r , revert-buffer-with-coding-system C-x RET l , set-language-environment Maybe it's what you want. --=20 Regards, Lei