From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.help Subject: Re: problem with editing/decoding utf-8 text Date: 23 May 2003 17:20:24 -0400 Organization: Yale University Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <5lwugh8inb.fsf@rum.cs.yale.edu> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1053727611 602 80.91.224.249 (23 May 2003 22:06:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 23 May 2003 22:06:51 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sat May 24 00:06:49 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 19JKga-00009M-00 for ; Sat, 24 May 2003 00:06:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19JKgF-000426-Ro for gnu-help-gnu-emacs@m.gmane.org; Fri, 23 May 2003 18:06:27 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!canoe.uoregon.edu!news.wss.yale.edu!rum.cs.yale.edu!rum.cs.yale.edu Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-NNTP-Posting-Host: rum.cs.yale.edu Original-X-Trace: news.wss.yale.edu 1053724833 6820 128.36.229.169 (23 May 2003 21:20:33 GMT) Original-X-Complaints-To: news@news.wss.yale.edu Original-NNTP-Posting-Date: Fri, 23 May 2003 21:20:33 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-Original-NNTP-Posting-Host: rum.cs.yale.edu X-Original-Trace: 23 May 2003 17:20:24 -0400, rum.cs.yale.edu Original-Xref: shelby.stanford.edu gnu.emacs.help:113639 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:10135 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10135 > Now, no matter what I choose (raw-text, no-conversion, utf-8), it > modifies all of the utf8 chars which are not fit into the ascii charset. > It seems, that it inserts a \201 before every char which is not in the > ascii charset. I.e. if I just load and save a file, emacs does not > behaves transparently. Do you also get the \201 if you choose `utf-8' ? If so, it's definitely a bug. > 0. What is this \201 byte? An internal thing that you shouldn't see unless you ask to see it. Using `raw-text' or `no-conversion' is debatably considered as "asking to see it", but utf-8 definitely isn't, so if you see it with utf-8, it's a bug. > 1. Cannot I tell to a buffer (after the load of a file) that interpet it > as binary, and save exactly the same bytes what it did read into the > buffer (i.e. transparent buffer)? If you save with the same coding-system as when you loaded, yes. In your case, you loaded with a latin-1 coding-system and then saved with another, so obviously Emacs had to do some conversion work and you don't get the same sequence of byte. Of course the fact that Emacs happily visited the file in latin-1 but then refused to save it in latin-1 is a bug. I vaguely seem to remember that such a bug has been fixed in Emacs-CVS, but it would be great if you could either check it or report a precise test case. > 2. What is the difference between raw-text, no-conversion, binary? On > some places, I can choose any of them, on other places not... This whole > coding system is a nightmare... :((( Yes it is but it's not all Emacs fault. The only alternative would be for Emacs to say "I only ever support 1 encoding". The current code is supposed to work just fine in this "single encoding" situation while also allowing you to use other encodings if you want to. Of course bugs, make this dream a bit less sweet. Stefan