From b258e91b215e96dc5f60463e88e76623d6d3bc77 Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Fri, 28 Jul 2006 16:23:08 +0000 Subject: [PATCH] Add the condition of whether all characters are in the XML-CHAR alphabet to ENCODE-STRING's decision of whether to return raw strings or base64-encoded data. --- v7/src/xml/xml-rpc.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/v7/src/xml/xml-rpc.scm b/v7/src/xml/xml-rpc.scm index cdd2a9d4e..8c8538b1c 100644 --- a/v7/src/xml/xml-rpc.scm +++ b/v7/src/xml/xml-rpc.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xml-rpc.scm,v 1.5 2006/07/25 18:21:44 riastradh Exp $ +$Id: xml-rpc.scm,v 1.6 2006/07/28 16:23:08 riastradh Exp $ Copyright 2003,2004,2005,2006 Massachusetts Institute of Technology @@ -293,7 +293,12 @@ USA. 'encode-value)))))) (define (encode-string string) - (if (utf8-string-valid? string) + (if (and (utf8-string-valid? string) + (for-all-chars-in-string? (alphabet-predicate alphabet:xml-char) + string + 0 + (string-length string) + 'UTF-8)) string (rpc-elt:base64 (call-with-output-string -- 2.25.1