unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* MULE: how to detect characters which can't be saved correctly.
@ 2006-04-02  5:56 Jimmy Lao
  2006-04-02 17:28 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Jimmy Lao @ 2006-04-02  5:56 UTC (permalink / raw)



Somtimes when I want to save a file containing multi-byte charaters,
the following message appears:

---------------------------------------------------------
These default coding systems were tried to encode text
in the buffer `temp':
  chinese-gd2312
However, each of them encountered these problematic characters:
  chinese-gb2312: <some numbers listed here>
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:
  utf-8 utf-16 utf-16 utf-16 utf-16be utf-16le iso-2022-7bit
Or specify any other coding system
at the risk of losing the problematic characters.
---------------------------------------------------------

Even if I choose utf-8, the buffer won't be saved correctly, as Emacs
doesn't really recognize these characters.

So, can I detect such problematic characters after I open the file, and
before I make any modification to the buffer? Which elisp function
should I use?

Thanks.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

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

* Re: MULE: how to detect characters which can't be saved correctly.
  2006-04-02  5:56 MULE: how to detect characters which can't be saved correctly Jimmy Lao
@ 2006-04-02 17:28 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2006-04-02 17:28 UTC (permalink / raw)


> From: "Jimmy Lao" <jmlao@hotmail.com>
> Bcc: 
> Date: Sun, 02 Apr 2006 05:56:46 +0000
> 
> So, can I detect such problematic characters after I open the file, and
> before I make any modification to the buffer?

How about trying to save the buffer, and then looking where it says:

> The first problematic character is at point in the displayed buffer,
> and C-u C-x = will give information about it.

Would this do what you want?

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

end of thread, other threads:[~2006-04-02 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-02  5:56 MULE: how to detect characters which can't be saved correctly Jimmy Lao
2006-04-02 17:28 ` 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).