From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: utf-translate-cjk-mode question Date: Fri, 25 Apr 2003 15:59:38 +0200 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <841xzqoeyd.fsf@lucy.is.informatik.uni-duisburg.de> References: <84adej4tmj.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1051279902 6352 80.91.224.249 (25 Apr 2003 14:11:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 25 Apr 2003 14:11:42 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 25 16:11:41 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1993uN-0001YA-00 for ; Fri, 25 Apr 2003 16:10:35 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 199417-0001tt-00 for ; Fri, 25 Apr 2003 16:17:33 +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 1993uT-0003AX-05 for emacs-devel@quimby.gnus.org; Fri, 25 Apr 2003 10:10:41 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 1993t8-0002vV-00 for emacs-devel@gnu.org; Fri, 25 Apr 2003 10:09:19 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 1993sm-0002jj-00 for emacs-devel@gnu.org; Fri, 25 Apr 2003 10:08:56 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 1993p8-00013U-00 for emacs-devel@gnu.org; Fri, 25 Apr 2003 10:05:11 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1993lz-0000pS-00 for ; Fri, 25 Apr 2003 16:01:55 +0200 Mail-Followup-To: emacs-devel@gnu.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1993l5-0000mJ-00 for ; Fri, 25 Apr 2003 16:00:59 +0200 Original-Lines: 29 Original-X-Complaints-To: usenet@main.gmane.org Mail-Copies-To: never User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:rkPvA0PctDfUnyi7pBUOuwShWs8= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13447 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13447 kai.grossjohann@gmx.net (Kai Großjohann) writes: > In my ~/.emacs file, I have this piece of code: > > (when (fboundp 'utf-translate-cjk-mode) > (let ((current-language-environment "Chinese-GB")) > (utf-translate-cjk-mode 1))) > > I start Emacs. I open a new file. I say C-u C-\ chinese-py RET. I > then type "nihao" into the buffer. I say C-x RET f utf-8 RET. Then > I try to save the buffer. > > Emacs tells me that it can't encode the Chinese characters, and it > tried iso-latin-1 and utf-8 as encodings, and now it's suggesting > gb2312 as the encoding to use. I've now tried (encode-coding-region (point-min) (point-max) 'utf-8) on that buffer. This produces \344\275\240\345\245\275 which I guess might be right (but I didn't check). So why can Emacs encode the buffer into UTF-8 but can't save the buffer in UTF-8 encoding? coding-category-list contains coding-category-utf-8 as the last element. I'm quite confused now. -- file-error; Data: (Opening input file no such file or directory ~/.signature)