> Note how explicit UTF-8 encoding helps nothing, because `url-request-data' > is later concatenated with some strings turning multibyte again:
The problem here is not so much the use of string concatenation but the fact that string concatenation uses string-make-multibyte rather than string-to-multibyte. Another way to look at it and to say that this concatenation should only be done with unibyte strings, so those strings that are concatenated to your string should all be made unibyte. Would the patch below do the trick? Stefan --- orig/lisp/url/url-http.el +++ mod/lisp/url/url-http.el @@ -198,7 +198,11 @@ ;; allows us to elide null lines directly, at the cost of making ;; the layout less clear. (setq request - (concat + (mapconcat + ;; We'd really want here `string-to-unibyte', so as to signal an + ;; error if one of the strings contains a multibyte char. + 'string-as-unibyte + (list ;; The request (or url-request-method "GET") " " (if proxy-obj (url-recreate-url proxy-obj) real-fname) @@ -266,7 +270,8 @@ ;; End request "\r\n" ;; Any data - url-request-data)) + url-request-data) + "")) (url-http-debug "Request is: \n%s" request) request)) _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel