From: Taylor R. Campbell Date: Fri, 28 Jul 2006 16:23:08 +0000 (+0000) Subject: Add the condition of whether all characters are in the XML-CHAR X-Git-Tag: 20090517-FFI~970 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b258e91b215e96dc5f60463e88e76623d6d3bc77;p=mit-scheme.git 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. --- 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