unofficial mirror of emacs-devel@gnu.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>,
	Stefan Monnier <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 21:18:38 +0800	[thread overview]
Message-ID: <CAH-ciFrMFPkubigGFucbbUsdd4TNbpFxCf-MbZgVS4uDAmv7Sg@mail.gmail.com> (raw)
In-Reply-To: <87d1qx9qv7.fsf@gmx.de>

2016-03-14 20:38 GMT+08:00 Michael Albinus <michael.albinus@gmx.de>:
> Alex Harsanyi <alexharsanyi@gmail.com> writes:
>
>> 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.
>
> Well, if debbugs.el would get an indication from soap-client.el, whether
> a string was encoded as xsd:string or xsd:base64Binary, it could decode
> the latter values itself. Less convenient, but so what.

We were discussing with Thomas to have soap-client.el return the
base64 string "as is" and let the caller decode and process it.
Unfortunately, there is no base64-string-p function and this value
would look like a (multibyte) string.  Perhaps we could return (cons
'base64 value), or a more appropriate type for a "array of bytes"
concept.  I'm open to suggestions.

>
>> 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).
>
> Is there a way to tell soap-client.el, what to do with base64 encoded values?
> Something like a user-defined function, or alike?

This would not work in the general case except when all base64 encoded
values are the same underlying type (like utf8).

Although, given that debbugs.el is the only soap-client client that is
affected by this, we can add a simple "soap-base64-handler" function
to do what needs doing, and we can always extend that interface later
as more use cases emerge.

Best Regards,
Alex.



  reply	other threads:[~2016-03-14 13:18 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 [this message]
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

  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=CAH-ciFrMFPkubigGFucbbUsdd4TNbpFxCf-MbZgVS4uDAmv7Sg@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 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).