emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/xml-rpc 7bcf1427b7 07/64: (xml-rpc-value-datep): New funct


From: Stefan Kangas
Subject: [nongnu] elpa/xml-rpc 7bcf1427b7 07/64: (xml-rpc-value-datep): New function to determine if a string is an ISO date. (xml-rpc-value-to-xml-list): Add support for vector inputs. Add support for strings that are really dates.
Date: Fri, 31 Dec 2021 20:10:55 -0500 (EST)

branch: elpa/xml-rpc
commit 7bcf1427b7c19faa88841a204c129c6ab28f918f
Author: Mark A. Hershberger <mah@everybody.org>
Commit: Mark A. Hershberger <mah@everybody.org>

    (xml-rpc-value-datep): New function to determine if a string is an ISO 
date. (xml-rpc-value-to-xml-list): Add support for vector inputs. Add support 
for strings that are really dates.
---
 xml-rpc.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/xml-rpc.el b/xml-rpc.el
index b93fb9a333..1c6fb6c8bb 100644
--- a/xml-rpc.el
+++ b/xml-rpc.el
@@ -164,6 +164,11 @@
 into Base64."
   :type 'boolean :group 'xml-rpc)
 
+(defcustom xml-rpc-base64-decode-unicode t
+  "If non-nil, then base64 strings will be decoded using the
+utf-8 coding system."
+  :type 'boolean :group 'xml-rpc)
+
 (defcustom xml-rpc-debug 0
   "Set this to 1 or greater to avoid killing temporary buffers.
 Set it higher to get some info in the *Messages* buffer")
@@ -233,7 +238,9 @@ interpreting and simplifying it while retaining its 
structure."
     (cond
      ;; Base64
      ((eq valtype 'base64)
-      (rfc2047-decode "utf-8" ?B valvalue))
+      (if xml-rpc-base64-decode-unicode
+         (decode-coding-string (base64-decode-string valvalue) 'utf-8)
+       (base64-decode-string valvalue)))
      ;; Boolean
      ((eq valtype 'boolean)
       (xml-rpc-string-to-boolean valvalue))
@@ -512,7 +519,7 @@ or nil if called with ASYNC-CALLBACK-FUNCTION."
        (let* ((status url-http-response-status)
               (result (cond
                        ;; A probable XML response
-                       ((looking-at "<\\?xml *version=.*\\??>")
+                       ((looking-at "<\\?xml ")
                         (xml-rpc-clean (xml-parse-region (point-min) 
(point-max))))
                          
                        ;; No HTTP status returned



reply via email to

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