diff options
| author | Andreas Schwab | 2016-01-06 20:50:02 +0100 |
|---|---|---|
| committer | Andreas Schwab | 2016-01-06 20:51:36 +0100 |
| commit | b6b47af82f6c7d960388ec46dd8ab371c2e34de4 (patch) | |
| tree | 3706364dfefa1f8f276b761082a1a581d2d52f33 | |
| parent | c63246628461f748d66a8a07ba008de2e00fd33a (diff) | |
| download | emacs-b6b47af82f6c7d960388ec46dd8ab371c2e34de4.tar.gz emacs-b6b47af82f6c7d960388ec46dd8ab371c2e34de4.zip | |
Properly encode/decode base64Binary data in SOAP
* lisp/net/soap-client.el (soap-encode-xs-basic-type): Encode
base64Binary value as utf-8.
(soap-decode-xs-basic-type): Decode base64Binary value as utf-8.
| -rw-r--r-- | lisp/net/soap-client.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index f8cdaa9bc56..74024644966 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el | |||
| @@ -538,7 +538,7 @@ This is a specialization of `soap-encode-value' for | |||
| 538 | (base64Binary | 538 | (base64Binary |
| 539 | (unless (stringp value) | 539 | (unless (stringp value) |
| 540 | (error "Not a string value for base64Binary")) | 540 | (error "Not a string value for base64Binary")) |
| 541 | (base64-encode-string value)) | 541 | (base64-encode-string (encode-coding-string value 'utf-8))) |
| 542 | 542 | ||
| 543 | (otherwise | 543 | (otherwise |
| 544 | (error "Don't know how to encode %s for type %s" | 544 | (error "Don't know how to encode %s for type %s" |
| @@ -682,7 +682,7 @@ This is a specialization of `soap-decode-type' for | |||
| 682 | decimal byte float double duration) | 682 | decimal byte float double duration) |
| 683 | (string-to-number (car contents))) | 683 | (string-to-number (car contents))) |
| 684 | (boolean (string= (downcase (car contents)) "true")) | 684 | (boolean (string= (downcase (car contents)) "true")) |
| 685 | (base64Binary (base64-decode-string (car contents))) | 685 | (base64Binary (decode-coding-string (base64-decode-string (car contents)) 'utf-8)) |
| 686 | (anyType (soap-decode-any-type node)) | 686 | (anyType (soap-decode-any-type node)) |
| 687 | (Array (soap-decode-array node)))))) | 687 | (Array (soap-decode-array node)))))) |
| 688 | 688 | ||