Subject: bug#24239: 25.1; Potential regression: Multibyte text in HTTP request

From: Damien Cassou <[email-masked]>
Date: Wed, 21 Sep 2016 12:27:52 +0200

Dmitry Gutov <[email-masked]> writes:

> On 08/16/2016 09:23 AM, Damien Cassou wrote:
>
>> - what will happen to my multibyte characters (such as ⇒) that I'm using
>>   for months and that worked well with Emacs 24?
>
> Unibyte != ASCII. Use encode-coding-string.

sorry, I don't understand how to do that. org-caldav code is quite
simple. The two important functions are:

https://github.com/dengste/org-caldav/blob/master/org-caldav.el#L1246
https://github.com/dengste/org-caldav/blob/master/org-caldav.el#L315

    (defun org-caldav-put-event (buffer)
      "Add event in BUFFER to calendar.
     The filename will be derived from the UID."
      [...]
       (org-caldav-save-resource
          (concat (org-caldav-events-url) uid org-caldav-uuid-extension)
          (encode-coding-string (buffer-string) 'utf-8))))))

  (defun org-caldav-save-resource (url obj)
    "Save string OBJ as URL using WebDAV."
    (let* ((url-request-extra-headers
            '(("Content-type" . "text/calendar; charset=UTF-8")))
           (url-request-method "PUT")
           (url-request-data obj)
           (buffer (url-retrieve-synchronously url))
           result)
    [...]))

As you can see, encode-coding-string is already used to encode to utf-8.
Do I have to switch from utf-8 to iso-8859-*?

Sorry, I'm lost.

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill