From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#31248: 27.0.50; Regression: Multibyte text in HTTP request Date: Tue, 24 Apr 2018 14:23:04 +0200 Message-ID: References: <87tvs1f4w6.fsf@linux-m68k.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1524572538 775 195.159.176.226 (24 Apr 2018 12:22:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 24 Apr 2018 12:22:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 31248@debbugs.gnu.org To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 24 14:22:14 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fAwxY-0008UJ-7A for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Apr 2018 14:22:12 +0200 Original-Received: from localhost ([::1]:58278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAwzd-00079X-C5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Apr 2018 08:24:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAwzP-00075w-JQ for bug-gnu-emacs@gnu.org; Tue, 24 Apr 2018 08:24:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAwzK-0006yG-MO for bug-gnu-emacs@gnu.org; Tue, 24 Apr 2018 08:24:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58094) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fAwzK-0006xm-I3 for bug-gnu-emacs@gnu.org; Tue, 24 Apr 2018 08:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fAwzK-0003BY-A4 for bug-gnu-emacs@gnu.org; Tue, 24 Apr 2018 08:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Apr 2018 12:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31248 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31248-submit@debbugs.gnu.org id=B31248.152457259812192 (code B ref 31248); Tue, 24 Apr 2018 12:24:02 +0000 Original-Received: (at 31248) by debbugs.gnu.org; 24 Apr 2018 12:23:18 +0000 Original-Received: from localhost ([127.0.0.1]:37758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fAwyY-0003AT-MI for submit@debbugs.gnu.org; Tue, 24 Apr 2018 08:23:18 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:59503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fAwyT-0003AJ-Md for 31248@debbugs.gnu.org; Tue, 24 Apr 2018 08:23:13 -0400 Original-Received: from cm-84.212.221.165.getinternet.no ([84.212.221.165] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fAwyO-00019D-Ok; Tue, 24 Apr 2018 14:23:08 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAADFBMVEUnHxvQvaOJc2JcTEIj 7ROpAAACR0lEQVQokSWQTWjTYBjHHxcEoXE9efAiw+ml1bYsty0mR0EFGfokdtXDlLQsc7pLnRNP 86RWBTXi6s25ur4JrA4/2CwmVAb7qFT8ODhklA21S8NWJ4K2ofEdHn/8//yeD3iGPeNDiny8tp4X 4BZ27+7+Jh8JNVwRkn3PVyampd9C3fEAzx0cQKHHZ824ITg1eGjgzGHJfKG7YThhXB9O9v4Ivlyk SeyD//Xn2NHFaquxDtL5nVdQ+pqeOmsEATPvhlDaZ6ULRhUUBROY2NN72pkIQBwxivJH4VqOgjqK mJTuPd7fX7FhJCMnL326W5p95QTAbErTyfvvndlqJQA4jGvJ0eXc/MYfCqh9z+CytfBmjs5BBZfi ex8uTLlbyS7q9ty/ap5CbElDZIX5HppE+7L2Gl5d3a4eCICGspLF/FxAtUJAqCEqAb+N0Jr5hS4n M0aB0A00Dfu0k7+4EjGoTdEuaPJPliH0VfhAiWlPWgy/7giAhCjq0672Lp3WNJ1Ex7OPeDLmdMIM yaaVyRVQDapOpDNZTKVqrbni1tmExFfC4RTHUnWGENJY5VtytKZW7ToxzWaQoUm/qTfJ2A3SzvMi XLTJDJm4TXxtbCeoecEmejupFCIiEItr1O+kAikROuFymfFssxz0eawIOWCYzU2zVtdBAAuYSEfH jrcNmyYWALRwvNiw3f/AQFtrXadws1gEsCJcc5LCIBRZxmXDviqFY2AV+XKpyzNrAoxYEdYJcWKj VKMCv+dn/GLd8yjkOKqD0kaJwj+mVyCMmKyHNQAAAABJRU5ErkJggg== In-Reply-To: (Lars Ingebrigtsen's message of "Tue, 24 Apr 2018 14:17:38 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:145726 Archived-At: Lars Ingebrigtsen 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