unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Damien Cassou <damien@cassou.me>
To: Dmitry Gutov <dgutov@yandex.ru>, 24239@debbugs.gnu.org
Subject: bug#24239: 25.1; Potential regression: Multibyte text in HTTP request
Date: Wed, 21 Sep 2016 12:27:52 +0200	[thread overview]
Message-ID: <8760pp1r9z.fsf@cassou.me> (raw)
In-Reply-To: <5c4a3484-735b-10df-8fe9-89323fbe43c3@yandex.ru>

Dmitry Gutov <dgutov@yandex.ru> 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





  parent reply	other threads:[~2016-09-21 10:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-15 18:58 bug#24239: 25.1; Potential regression: Multibyte text in HTTP request Damien Cassou
2016-08-15 21:52 ` Dmitry Gutov
2016-08-16  6:23   ` Damien Cassou
2016-08-16  8:16     ` Dmitry Gutov
2016-08-16 15:01       ` Eli Zaretskii
2016-08-17  1:32         ` Dmitry Gutov
2016-08-17  2:44           ` Eli Zaretskii
2016-08-17  3:57             ` Dmitry Gutov
2016-08-17 15:17               ` Eli Zaretskii
2016-08-17 18:02                 ` Dmitry Gutov
2016-08-17 18:31                   ` Eli Zaretskii
2016-09-21 10:27       ` Damien Cassou [this message]
2016-09-21 10:34         ` Dmitry Gutov
2016-09-21 13:16           ` Damien Cassou
2018-02-09  0:35             ` Noam Postavsky

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=8760pp1r9z.fsf@cassou.me \
    --to=damien@cassou.me \
    --cc=24239@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /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).