From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.60; Can't start emacs when filename contains national character Date: Sat, 29 Mar 2008 16:22:53 -0400 Message-ID: References: <47EDA753.4030107@gmail.com> <87od8x67r5.fsf@gmx.de> <87wsnl4miu.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1206822304 19856 80.91.229.12 (29 Mar 2008 20:25:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2008 20:25:04 +0000 (UTC) Cc: lekktu@gmail.com, lennart.borgman@gmail.com, svenjoac@gmx.de, emacs-pretest-bug@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 29 21:25:34 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JfhcL-0003Vy-KC for ged-emacs-devel@m.gmane.org; Sat, 29 Mar 2008 21:25:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jfhbj-0008AX-S7 for ged-emacs-devel@m.gmane.org; Sat, 29 Mar 2008 16:24:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jfhbd-00088x-PX for emacs-devel@gnu.org; Sat, 29 Mar 2008 16:24:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jfhbb-00087F-D0 for emacs-devel@gnu.org; Sat, 29 Mar 2008 16:24:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jfhba-00086e-R1 for emacs-devel@gnu.org; Sat, 29 Mar 2008 16:24:46 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jfhba-00055C-Lm for emacs-devel@gnu.org; Sat, 29 Mar 2008 16:24:46 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Jfhba-0001zN-Ae for emacs-pretest-bug@gnu.org; Sat, 29 Mar 2008 16:24:46 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JfhZq-0004qW-SA for emacs-pretest-bug@gnu.org; Sat, 29 Mar 2008 16:23:01 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182] helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JfhZn-0004pg-F1; Sat, 29 Mar 2008 16:22:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag4FAHpC7kfO+LLN/2dsb2JhbACBWqdX X-IronPort-AV: E=Sophos;i="4.25,576,1199682000"; d="scan'208";a="17134913" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 29 Mar 2008 16:22:54 -0400 Original-Received: from pastel.home ([206.248.178.205]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id JXZ32854; Sat, 29 Mar 2008 16:22:54 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id D974C7FCD; Sat, 29 Mar 2008 16:22:53 -0400 (EDT) In-Reply-To: (Eli Zaretskii's message of "Sat, 29 Mar 2008 22:47:19 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:93833 gmane.emacs.pretest.bugs:21778 Archived-At: >> > That probably means I used the wrong to/make-multibyte function to fix >> > the problem. Will look into it, thanks. >> >> I recommend to stay as far away from string-to/as/make-unit/multibyte >> as possible. Use en/decode-coding-string instead. > That's what I did eventually. I tried to be smart at first, to maybe > avoid the overhead of full-fledged decoding, but gave up and used > DECODE_FILE instead. If the issue is performance, maybe we should just improve (en|de)code-coding-string to recognize those few special cases and redirect them to string-(to|as)-(uni|multi)byte. Note that is set-unibyte-charset is never called (which should always be the case now), string-make-foo is identical to string-to-foo. So the remaining two cases ("to" and "as") work as follows: "to" = `binary' "as" = internal CS (i.e. `utf-8-emacs', but was `emacs-mule' before) Funnily enough we do not have a coding-system `emacs-internal' which would be `emacs-mule' in Emacs-22 and `utf-8-emacs' in Emacs-23. I guess we can use (if (coding-system-p 'utf-8-emacs) 'utf-8-emacs 'emacs-mule) if we need it. Stefan