emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-25 b6b47AF: Properly encode/decode base64Binary data in SOAP


From: Michael Albinus
Subject: Re: emacs-25 b6b47AF: Properly encode/decode base64Binary data in SOAP
Date: Mon, 14 Mar 2016 14:30:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Alex Harsanyi <address@hidden> writes:

> 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.

Array of bytes sounds appropriate to me. This is similar to D-Bus, which
uses an array of bytes in case it cannot marshal the data into a proper type.

>>> 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).

Your default could behave as you like. It would be the responsibility of
the calling library to replace the default by a proper
function. debbugs.el would know, that all base64 encoded data must be
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.

Would be OK to me also.

> Best Regards,
> Alex.

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]