From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix D-Bus string encoding. Date: Wed, 09 Jun 2010 23:49:00 -0400 Message-ID: References: <87typdnr08.fsf@keller.adm.naquadah.org> <1276074981-8930-1-git-send-email-julien@danjou.info> <877hm7iovq.fsf@catnip.gol.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1276141799 2975 80.91.229.12 (10 Jun 2010 03:49:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 10 Jun 2010 03:49:59 +0000 (UTC) Cc: julien@danjou.info, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 10 05:49:58 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OMYlV-0002Sj-U2 for ged-emacs-devel@m.gmane.org; Thu, 10 Jun 2010 05:49:55 +0200 Original-Received: from localhost ([127.0.0.1]:36581 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMYlP-0002py-BZ for ged-emacs-devel@m.gmane.org; Wed, 09 Jun 2010 23:49:07 -0400 Original-Received: from [199.232.76.173] (port=51743 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMYlL-0002p9-0d for emacs-devel@gnu.org; Wed, 09 Jun 2010 23:49:03 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1OMYlK-0006lQ-BG for emacs-devel@gnu.org; Wed, 09 Jun 2010 23:49:02 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:40774) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1OMYlK-0006lL-3F for emacs-devel@gnu.org; Wed, 09 Jun 2010 23:49:02 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OMYlI-00076m-1j; Wed, 09 Jun 2010 23:49:00 -0400 In-reply-to: <877hm7iovq.fsf@catnip.gol.com> (message from Miles Bader on Thu, 10 Jun 2010 11:48:41 +0900) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:125696 Archived-At: > From: Miles Bader > System-Type: x86_64-unknown-linux-gnu > Date: Thu, 10 Jun 2010 11:48:41 +0900 > Cc: julien@danjou.info, Stefan Monnier , > emacs-devel@gnu.org > Reply-To: Miles Bader > > Isn't there some function in Emacs which "converts", but internally > checks to see if the desired output encoding is the same as Emacs' > internal encoding, and avoids the actual conversion in that case? What do you mean by "encoding is the same"? If the internal encoding is utf-8-emacs, while the external is utf-8, are they "the same" or not? Anyway, I think avoiding the conversion in this case is a classic example of premature optimization: no one have made the case that performance matters in this case. If you look at encode_coding_utf_8 you will see that it's no more than a fancy copy for almost every character (notable exception being eight-bit characters, aka raw bytes). What exactly are we saving here by "avoiding the conversion"? Am I missing something?