From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: coding systems Date: Tue, 03 Nov 2009 20:53:50 +0200 Message-ID: <83skcvbfsx.fsf@gnu.org> References: <87k4y8xwvb.fsf@kzsu.stanford.edu> <87y6moul4y.fsf@kzsu.stanford.edu> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1257274573 14196 80.91.229.12 (3 Nov 2009 18:56:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Nov 2009 18:56:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 03 19:56:06 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N5OY1-0004zY-1E for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Nov 2009 19:56:05 +0100 Original-Received: from localhost ([127.0.0.1]:46442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5OY0-0003BO-KC for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Nov 2009 13:56:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5OWL-0002rt-7G for help-gnu-emacs@gnu.org; Tue, 03 Nov 2009 13:54:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5OWG-0002nz-JT for help-gnu-emacs@gnu.org; Tue, 03 Nov 2009 13:54:20 -0500 Original-Received: from [199.232.76.173] (port=53270 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5OWG-0002nh-Dm for help-gnu-emacs@gnu.org; Tue, 03 Nov 2009 13:54:16 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:59997) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N5OWF-0002eX-To for help-gnu-emacs@gnu.org; Tue, 03 Nov 2009 13:54:16 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KSJ00400PZCV700@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Tue, 03 Nov 2009 20:53:48 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.70.37.193]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KSJ00MAFR5K8RJ0@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Tue, 03 Nov 2009 20:53:45 +0200 (IST) In-reply-to: <87y6moul4y.fsf@kzsu.stanford.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69446 Archived-At: > From: Joseph Brenner > Date: Mon, 02 Nov 2009 23:23:41 -0800 > > > For what use-cases? Do you type non-ASCII characters? If so, what > > ranges of Unicode or character sets do you use? How often does it > > happen that you edit an existing file and add to it characters from > > character sets that were not there in the first place? Etc., etc. > > > > Also, how much data loss are you willing to sustain? > > > > IOW, without further details it is impossible to answer your question. > > If it trashed everything but ascii characters, then that'd be my > problem, given the way I just asked the question. Sadly, this tells nothing about your typical use-cases. > However, it would seem to me that I should be able to just tell the > system to always use latin-1 (or utf-8) when in doubt There is no doubt. When Emacs asks you to provide a coding system, it _knows_for_sure_ it cannot encode the text with any of the encodings that are hinted by your defaults and the system's setup. So, if you setup Emacs to prefer UTF-8, as Peter suggested, and Emacs still pops the question, it means UTF-8 cannot be used in this case, period. The only way to never get this question is to have your default encoding be utf-8-emacs. (This is the encoding used by Emacs internally, which extends UTF-8 and Unicode with some codepoints private to Emacs.) It's possible that you can also avoid the question by setting the default to raw-text. Caveat emptor: doing so may produce files that only Emacs will be able to display correctly, and that you may need to specify the encoding explicitly when visiting files thus saved. > someone must've been down this road already Not necessarily. With Emacs 23, the question pops rather rarely, so I gather most users aren't annoyed at all. Which is another reason to tell more about your plight: if this happens to you more than you are able to endure, something is probably wrong in your setup.