Subject: Re: bug#24117: 25.1; url-http-create-request: Multibyte text in HTTP request

From: Sho Takemori <[email-masked]>
Date: Sat, 13 Aug 2016 16:31:56 +0900

> I guess we need to run url-mime-charset-string through
> url-http--encode-string as well.  Can you try that?

Yes. I attached a patch.

2016-08-13 16:02 GMT+09:00 Eli Zaretskii <[email-masked]>:

> > From: Sho Takemori <[email-masked]>
> > Date: Sat, 13 Aug 2016 09:30:35 +0900
> > Cc: Eli Zaretskii <[email-masked]>, [email-masked], [email-masked],
> >       [email-masked]
> >
> > But I set the language environment by (set-language-environment
> "Japanese") in ~/.emacs.d/init.el.
> > With the configration, I still see the same error when using
> anaconda-mode.
> >
> > And url-mime-charset-string in url-http-create-request is a multibyte
> stirng
>
> I guess we need to run url-mime-charset-string through
> url-http--encode-string as well.  Can you try that?
>
> Thanks.
>
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 860e652..5840a08 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -313,9 +313,10 @@ url-http-create-request
 			  (setq url-mime-encoding-string "gzip")))
                  (concat
                   "Accept-encoding: " url-mime-encoding-string "\r\n"))
-             (if url-mime-charset-string
-                 (concat
-                  "Accept-charset: " url-mime-charset-string "\r\n"))
+             (url-http--encode-string
+              (if url-mime-charset-string
+                  (concat
+                   "Accept-charset: " url-mime-charset-string "\r\n")))
              ;; Languages we understand
              (if url-mime-language-string
                  (concat