all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Harsanyi <alexharsanyi@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Andreas Schwab <schwab@suse.de>, Eli Zaretskii <eliz@gnu.org>,
	Thomas Fitzsimmons <fitzsim@fitzsim.org>,
	monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: emacs-25 b6b47AF: Properly encode/decode base64Binary data in SOAP
Date: Mon, 14 Mar 2016 19:58:21 +0800	[thread overview]
Message-ID: <CAH-ciFrAWZ9FHPbxWyn5j4YkjwgNyBY5D_XGdftp7X1Hmfi7bQ@mail.gmail.com> (raw)
In-Reply-To: <87fuvtqv33.fsf@gmx.de>

2016-03-14 17:15 GMT+08:00 Michael Albinus <michael.albinus@gmx.de>:
> Andreas Schwab <schwab@suse.de> writes:
>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>>> Andreas, is it possible to move the decoding of originator from
>>> soap-client to debbugs?
>>
>> That needs to be answered by its author.
>
> As explained in my other message, originator (and other attributes)
> could be sent by the debbugs server as either xsd:string or
> xsd:base64Binary. debbugs.el does not know which encoding has been
> applied, it must trust on consistent soap-client.el decoding.

The decoding in soap-client is consistent, even though not in the way
you would like it :-)

  * if it is told that a value is a string, it will return a string,
  * if it is told that a value is a byte array it will return a byte
array (unibyte string)

To use another example, if the SOAP server chooses to send all
parameters as strings:

    <example xsi:type="xsd:string">1234</example>

soap-client will decode them as strings, even though to the human
reader it is "obvious" that it is a number:

   '(example . "1234")

I think the problem here is that the debbugs server encodes utf8
values as base64, even though the message envelope is utf8 XML and
could handle them as normal strings.   debbugs.el does not want to
know about this, so expects strings to be strings.  soap-client.el is
caught in the middle.

I would also like to reiterate that base64 encoding can be used for
other things, such as images, and it would not be appropriate to
decode those as utf8 (not to mention that such a decoding might fail).

Best Regards,
Alex.

>
>> Andreas.
>
> Best regards, Michael.
>



  parent reply	other threads:[~2016-03-14 11:58 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 [this message]
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
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=CAH-ciFrAWZ9FHPbxWyn5j4YkjwgNyBY5D_XGdftp7X1Hmfi7bQ@mail.gmail.com \
    --to=alexharsanyi@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=fitzsim@fitzsim.org \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@iro.umontreal.ca \
    --cc=schwab@suse.de \
    /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.