unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: xml encoding conflict with my defult emacs language configuartion
@ 2004-02-24  6:16 niDapeng
  2004-02-24  6:53 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: niDapeng @ 2004-02-24  6:16 UTC (permalink / raw)
  Cc: help-gnu-emacs

I guess my English isn't good enough to explain my question exactly.
My emacs is Windows version 21.3.1. And you needn't try to guess my emacs setting from my email encoding, becuase I didn't use Emacs as my email client:)
My .emacs has such settting:
============================================
(set-language-environment 'Chinese-GB)
(set-clipboard-coding-system 'chinese-iso-8bit) ;euc-cn
(set-terminal-coding-system 'chinese-iso-8bit)
(set-buffer-file-coding-system 'chinese-iso-8bit)
(set-selection-coding-system 'chinese-iso-8bit)
(set-keyboard-coding-system 'chinese-iso-8bit)
(setq-default pathname-coding-system 'chinese-iso-8bit)

(modify-coding-system-alist 'process "*" 'chinese-iso-8bit)
(setq default-process-coding-system '(chinese-iso-8bit . chinese-iso-8bit))
====================================================

I use XAE to create a docbook XML file, and input Chinese words. When I save, message pop up like my last mail. I guess the reason is : my buffer file is GB2312 encoding, but emacs try to save it as UTF-8, and emacs can't convert GB2312 Chinese words to UTF-8 automatically. So emacs ask if I want to save forcedly .

BTW, my another mail, about "Redo" function. My mean is when I do more "undo", I can't use "redo" function to "undo" last time "undo":). I do think it's common request for an editor. but why emacs hasn't accept "redo" as default command.

Thanks your kindly reply!
Best

----------------------------------------------
ÍæÓÎÏ·Ó®ÊýÂëÏà»ú¡¢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/ 

^ permalink raw reply	[flat|nested] 4+ messages in thread
* xml encoding conflict with my defult emacs language configuartion
@ 2004-02-23  5:41 niDapeng
  2004-02-23  6:35 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: niDapeng @ 2004-02-23  5:41 UTC (permalink / raw)


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/ 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-02-24  6:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-24  6:16 xml encoding conflict with my defult emacs language configuartion niDapeng
2004-02-24  6:53 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2004-02-23  5:41 niDapeng
2004-02-23  6:35 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).