emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix D-Bus string encoding.


From: Eli Zaretskii
Subject: Re: [PATCH] Fix D-Bus string encoding.
Date: Wed, 09 Jun 2010 23:49:00 -0400

> From: Miles Bader <address@hidden>
> System-Type: x86_64-unknown-linux-gnu
> Date: Thu, 10 Jun 2010 11:48:41 +0900
> Cc: address@hidden, Stefan Monnier <address@hidden>,
>       address@hidden
> Reply-To: Miles Bader <address@hidden>
> 
> 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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]