unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Aaron Jensen <aaronjensen@gmail.com>
Cc: 31248@debbugs.gnu.org
Subject: bug#31248: 27.0.50; Regression: Multibyte text in HTTP request
Date: Tue, 24 Apr 2018 14:23:04 +0200	[thread overview]
Message-ID: <m3sh7kkd3r.fsf@gnus.org> (raw)
In-Reply-To: <m3wowwkdct.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 24 Apr 2018 14:17:38 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> (length foo)
> => 30
> (string-bytes foo)
> => 34
>
> Fun!  :-)

The reason here is that when you put raw bytes into a multibyte string,
Emacs has to represent that somehow, and it represents that with an
internal coding that takes two bytes per byte.  If you get my drift.

So the moral here is: That function is really, really badly designed,
because it makes it easy (for people like me) to make these errors
really easily.  Once I merge the `with-url' branch (which reimplements
all the HTTP stuff) into master I hopefully won't ever have to look at
that function again.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2018-04-24 12:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 16:20 bug#31248: 27.0.50; Regression: Multibyte text in HTTP request Aaron Jensen
2018-04-23 17:04 ` Lars Ingebrigtsen
2018-04-23 17:14   ` Aaron Jensen
2018-04-23 18:55     ` Lars Ingebrigtsen
2018-04-23 19:00       ` Aaron Jensen
2018-04-23 19:14         ` Lars Ingebrigtsen
2018-04-23 19:39           ` Aaron Jensen
2018-04-23 19:42             ` Lars Ingebrigtsen
2018-04-23 19:47               ` Aaron Jensen
2018-04-23 19:54                 ` Lars Ingebrigtsen
2018-04-24  0:47                   ` Aaron Jensen
2018-04-24  7:19                     ` Andreas Schwab
2018-04-24 11:21                       ` Aaron Jensen
2018-04-24 11:54                         ` Lars Ingebrigtsen
2018-04-24 12:06                         ` Lars Ingebrigtsen
2018-04-24 12:10                           ` Aaron Jensen
2018-04-24 12:17                             ` Lars Ingebrigtsen
2018-04-24 12:23                               ` Lars Ingebrigtsen [this message]
2018-04-24 12:31                                 ` Aaron Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3sh7kkd3r.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=31248@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).