From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nacho Newsgroups: gmane.emacs.help Subject: Re: Encodings in Emacs. Date: Mon, 19 May 2003 13:23:41 GMT Organization: Terra Networks Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1053352082 4886 80.91.224.249 (19 May 2003 13:48:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 19 May 2003 13:48:02 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Mon May 19 15:48:01 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Hkyp-0001CL-00 for ; Mon, 19 May 2003 15:47:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19HkeP-0000Ah-05 for gnu-help-gnu-emacs@m.gmane.org; Mon, 19 May 2003 09:26:01 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!pullfeed!newsfeed.cwix.com!nsnmpen1-lo.nuria.telefonica-data.net!telenews.teleline.es!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:YWdqt6+NU9wSKnOUZYWCGpMNTEo= Original-Lines: 49 Original-NNTP-Posting-Host: 10.20.31.4 Original-X-Complaints-To: usenet@teleline.es Original-X-Trace: telenews.teleline.es 1053350621 10.20.31.4 (Mon, 19 May 2003 15:23:41 MET DST) Original-NNTP-Posting-Date: Mon, 19 May 2003 15:23:41 MET DST Original-Xref: shelby.stanford.edu gnu.emacs.help:113381 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9875 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9875 Hello Oliver Oliver Scholz writes: > On the left side of the modeline there is a small indicator that is > meant to tell the file encoding of the current buffer. For example > for UTF-8 its is "u", for Latin-1 it is "1". You could look at that. > > Or you could look at the value of the variable > `buffer-file-coding-system' with `C-h v'. > Thanks. it was what I was looking for ;) I found te modeline a little confusing. Right now it is --1=:**-F1, I suppose that I should read more manuals ;) > When visiting a file, Emacs decodes that file into its internal > encoding `emacs-mule'. Emacs encodes this internal format then again, > when writing out the contents of the buffer. So when you do `C-x RET > f' (`set-buffer-file-coding-system') you don't change the encoding of > the buffer, you only tell Emacs to use another encoding when writing > the contents of the buffer out. Yes, I noticed that. > So the only way to get what you want is to tell Emacs which coding > system it should use to read that file *before* Emacs visits it. You > can do this with `C-x RET c'. For example: > `C-x RET c shift_jis RET C-x f your-file.txt RET' Great! now I can open the .txt files both in EUC-JP and ShiftJIS without problems, thans. > > But cautiion: I am not familiar with the encodings you mentioned, but > I think when you have a file with several encodings you will break > the parts with the "other" encodings, when you save that file. It works fine. It doesnt do auto-detection, but I am used to the "garbage" I get if I miss the coding, it looks different and I can reopen the files with the right format. Thanks for your help. Best regards.