From: Eli Zaretskii <eliz@gnu.org>
To: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Cc: michael.albinus@gmx.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: emacs-25 b6b47AF: Properly encode/decode base64Binary data in SOAP
Date: Tue, 15 Mar 2016 19:39:04 +0200 [thread overview]
Message-ID: <83k2l3bpzb.fsf@gnu.org> (raw)
In-Reply-To: <m3twk7vm9l.fsf@fitzsim.org> (message from Thomas Fitzsimmons on Tue, 15 Mar 2016 10:39:02 -0400)
> From: Thomas Fitzsimmons <fitzsim@fitzsim.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, monnier@iro.umontreal.ca, emacs-devel@gnu.org
> Date: Tue, 15 Mar 2016 10:39:02 -0400
>
> I think Andreas explained it with his code snippet. IIUC, async does a
> `read' on the sexp from the child process, and read returns a unibyte
> string if there are no non-ASCII characters in the string. If there are
> non-ASCII characters, then read returns a multibyte string:
>
> (let ((pair (read "(\"á\" \"a\")")))
> (list (multibyte-string-p (car pair))
> (multibyte-string-p (cdr pair))))
> => (t nil)
Yes.
> I don't think this will affect debbugs.el's functionality though, since
> it will always decode fields that it knows might contain non-ASCII.
Decoding a pure-ASCII string is harmless.
> The only difference will be that ASCII-only strings coming back from
> debbugs-over-async will be unibyte, whereas ASCII-only strings coming
> back from in-process debbugs.el will be multibyte, because:
>
> (multibyte-string-p
> (async-get (async-start
> `(lambda ()
> (decode-coding-string "a" 'utf-8)))))
> => nil
>
> (multibyte-string-p (decode-coding-string "a" 'utf-8))
> => t
>
> As long as no users of the debbugs.el APIs key off multibytedness of the
> strings, they'll be fine. I guess this is a quirk of async, that it
> strips the multibytedness of strings that are multibyte-ASCII-only in
> the inferior.
I don't think it's something async does, nor is it a quirk. Depending
on the APIs used, Emacs might decide to produce a unibyte string if
the text is pure ASCII. That is harmless and should never cause any
problems.
Thanks.
next prev parent reply other threads:[~2016-03-15 17:39 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160106200404.17375.71733@vcs.savannah.gnu.org>
[not found] ` <E1aGuJQ-0004Wv-Lz@vcs.savannah.gnu.org>
2016-03-10 1:03 ` emacs-25 b6b47af: Properly encode/decode base64Binary data in SOAP Thomas Fitzsimmons
2016-03-10 9:30 ` Andreas Schwab
2016-03-11 3:29 ` emacs-25 b6b47AF: " Thomas Fitzsimmons
2016-03-11 8:35 ` Andreas Schwab
2016-03-11 13:49 ` Alex Harsanyi
2016-03-11 14:09 ` Andreas Schwab
2016-03-11 16:48 ` Stefan Monnier
2016-03-11 16:59 ` Andreas Schwab
2016-03-11 22:27 ` Stefan Monnier
2016-03-13 3:52 ` Thomas Fitzsimmons
2016-03-13 15:15 ` Stefan Monnier
2016-03-13 18:09 ` Thomas Fitzsimmons
2016-03-13 16:02 ` Eli Zaretskii
2016-03-13 17:57 ` Thomas Fitzsimmons
2016-03-13 18:30 ` Eli Zaretskii
2016-03-13 19:54 ` Thomas Fitzsimmons
2016-03-13 20:19 ` Eli Zaretskii
2016-03-13 21:17 ` Thomas Fitzsimmons
2016-03-14 3:30 ` Eli Zaretskii
2016-03-14 8:49 ` Andreas Schwab
2016-03-14 9:15 ` Michael Albinus
2016-03-14 11:56 ` Stefan Monnier
2016-03-14 12:18 ` Alex Harsanyi
2016-03-14 11:58 ` Alex Harsanyi
2016-03-14 12:38 ` Michael Albinus
2016-03-14 13:18 ` Alex Harsanyi
2016-03-14 13:30 ` Michael Albinus
2016-03-14 13:26 ` Stefan Monnier
2016-03-14 14:12 ` Michael Albinus
2016-03-14 14:58 ` Thomas Fitzsimmons
2016-03-14 15:56 ` Michael Albinus
2016-03-14 17:58 ` Eli Zaretskii
2016-03-15 1:56 ` Thomas Fitzsimmons
2016-03-15 7:45 ` Andreas Schwab
2016-03-15 7:57 ` Michael Albinus
2016-03-15 7:49 ` Andreas Schwab
2016-03-15 8:08 ` Michael Albinus
2016-03-15 14:39 ` Thomas Fitzsimmons
2016-03-15 15:04 ` Michael Albinus
2016-03-17 14:23 ` Thomas Fitzsimmons
2016-03-17 15:39 ` Thomas Fitzsimmons
2016-03-17 19:24 ` Michael Albinus
2016-03-17 15:46 ` Stefan Monnier
2016-03-15 17:39 ` Eli Zaretskii [this message]
2016-03-14 17:53 ` Eli Zaretskii
2016-03-14 18:47 ` Michael Albinus
2016-03-14 18:57 ` Eli Zaretskii
2016-03-14 17:49 ` Eli Zaretskii
2016-03-14 18:44 ` Michael Albinus
2016-03-14 18:52 ` Eli Zaretskii
2016-03-14 19:05 ` Michael Albinus
2016-03-14 9:23 ` Thomas Fitzsimmons
2016-03-14 9:58 ` Andreas Schwab
2016-03-14 8:02 ` Michael Albinus
2016-03-14 12:39 ` Stefan Monnier
2016-03-14 17:55 ` Eli Zaretskii
2016-03-14 17:48 ` Eli Zaretskii
2016-03-14 18:42 ` Michael Albinus
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83k2l3bpzb.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=fitzsim@fitzsim.org \
--cc=michael.albinus@gmx.de \
--cc=monnier@iro.umontreal.ca \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.