From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Fery Newsgroups: gmane.emacs.help Subject: problem with editing/decoding utf-8 text Date: Fri, 23 May 2003 14:08:55 +0200 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3ECE0F57.7DFC8FE4@innomed.hu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1053692360 12428 80.91.224.249 (23 May 2003 12:19:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 23 May 2003 12:19:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Fri May 23 14:19:17 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 19JBU3-00032Z-00 for ; Fri, 23 May 2003 14:17:16 +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 19JBVw-00070Q-LS for gnu-help-gnu-emacs@m.gmane.org; Fri, 23 May 2003 08:19:12 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19JBUm-0006YI-UI for help-gnu-emacs@gnu.org; Fri, 23 May 2003 08:18:00 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19JBQK-00059M-Lr for help-gnu-emacs@gnu.org; Fri, 23 May 2003 08:13:25 -0400 Original-Received: from [212.24.168.157] (helo=lajos.innomed.hu) by monty-python.gnu.org with esmtp (Exim 4.20) id 19JBLS-000406-DE for help-gnu-emacs@gnu.org; Fri, 23 May 2003 08:08:22 -0400 Original-Received: from innomed.hu (FERY [100.0.0.218]) by lajos.innomed.hu with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2232.9) id JFB2ZR5T; Fri, 23 May 2003 14:22:12 +0200 X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en 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:10110 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10110 Hello there, I have a UTF-8 text file, containing latin-1 text. When I try to edit it with emacs, it does not detect that it is utf-8; the describe-coding-system gives back 'iso-latin-1-unix'. (And I see the two-byte representation of latin1 chars, which is not bad to me.) When I save the buffer, it displays an error message: These default coding systems were tried: iso-latin-1-unix However, none of them safely encodes the target text. 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. Moreover, there is a BUG: if I press ^G at the error message above, and quit without saving the file, it _deletes_ the file, although leaves an auto-save file (where the latin1 chars are bad). I have found one solution: opening the file with universal-coding-system-argument, using even UTF-8 (then I see correctly the chars, although it is not always important) or e.g. no-conversion. My questions: 0. What is this \201 byte? 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)? 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... :((( 3. Cannot I tell to emacs that interpret the keyboard input as "raw"? I have set input-meta to On, convert-meta to Off in .inputrc, and if I could tell emacs that "just interpret the bytes from the terminal input what they are", then I could copy/paste utf-8 data (in raw format) from another application. (I run emacs on linux, with the 'putty' terminal on windows). GNU Emacs 21.3.2 on debian unstable linux. Thanks: Circum