From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "niDapeng" Newsgroups: gmane.emacs.help Subject: xml encoding conflict with my defult emacs language configuartion Date: Mon, 23 Feb 2004 13:41:08 +0800 (CST) Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1077515741 27622 80.91.224.253 (23 Feb 2004 05:55:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Feb 2004 05:55:41 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 23 06:55:35 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Av942-0000hF-00 for ; Mon, 23 Feb 2004 06:55:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Av92s-0003p5-4z for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Feb 2004 00:54:22 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1Av92P-0003oQ-Ud for help-gnu-emacs@gnu.org; Mon, 23 Feb 2004 00:53:53 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1Av91t-0003Kr-QQ for help-gnu-emacs@gnu.org; Mon, 23 Feb 2004 00:53:52 -0500 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1Av91t-0003Ka-KL for help-gnu-emacs@gnu.org; Mon, 23 Feb 2004 00:53:21 -0500 Original-Received: from [61.140.60.50] (helo=21cn.com) by mx20.gnu.org with smtp (Exim 4.30) id 1Av8zV-0006Ps-F1 for help-gnu-emacs@gnu.org; Mon, 23 Feb 2004 00:50:57 -0500 Original-Received: from 21cn.com([10.2.2.2]) by 21cn.com(AIMC 2.9.5.6) with SMTP id jm354039b293; Mon, 23 Feb 2004 13:45:43 +0800 X-AIMailer: AIMC 2.9.5.6 2002.10.10 X-AIMime: MIME/SMIME Lib 2.9 2.9 2002.10.10 Original-To: help-gnu-emacs@gnu.org X-Priority: 3 X-Originating-IP: 170.252.155.65 X-AIMC-AUTH: (null) X-AIMC-MAILFROM: steveneo@21cn.com X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17081 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17081 I set my emacs environment as Chinese(GB2312), which is my common use. When I edit XML by UTF-8, I input some Chinese words( GB2312 encoding). When I try to save, emacs prompt there is conflict between them.Message as following: ====================================================== Selected encoding chinese-iso-8bit-dos disagrees with utf-8 specified by file contents. Really save (else edit coding cookies and try again)? (yes or no) ====================================================== I try to use "C-x RET-c UTF-8 C-x C-s" to save text, it prompt some message and also save some corrupt characters, and message as following: ================================================= These default coding systems were tried to encode text in the buffer `a.xml': utf-8 However, each of them encountered these problematic characters: utf-8: 中 文 The first problematic character is at point in the displayed buffer, and C-u C-x = will give information about it. Select one of the following safe coding systems, or edit the buffer: gb2312 hz-gb-2312 iso-2022-7bit Or specify any other coding system at the risk of losing the problematic characters. ================================================= I guess so: because my buffer text is GB2312 ( my input method only accept GB2312). Emacs can't convert GB2312 to UTF-8 automatically, it only enforce GB2312 to UTF-8. Is there a easy way to approach my reqired? I need: firstly, it can save GB2312 to UTF-8 correctly, secondly, it's better there aren't so many message to let me confirm, "silent save" is better. ---------------------------------------------- 玩游戏赢数码相机、MP3、U盘 http://mail.21cn.com/huodong/0310/ 中美日韩高中生性调查:日女生性观念最开放 http://news.21cn.com/huahua/ 广东ADSL用户有着数,21CN商务邮免费领 http://mail.21cn.com/vip 希腊前总理与美艳空姐闹出桃色性丑闻(图) http://news.21cn.com/social/