aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/README
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-07-13 06:05:13 +0000
committerLeon Breedt <bitserf@gmail.com>2005-07-13 06:05:13 +0000
commitdfc422b784d3f62daa5a876d65b0ac983c33408a (patch)
treeb435cb969ed40ace9355aa6e3791b766a5bde566 /actionwebservice/README
parentf29ce1f35670866cb86faedeabb28a33215a143f (diff)
downloadrails-dfc422b784d3f62daa5a876d65b0ac983c33408a.tar.gz
rails-dfc422b784d3f62daa5a876d65b0ac983c33408a.tar.bz2
rails-dfc422b784d3f62daa5a876d65b0ac983c33408a.zip
always send back SOAP responses as UTF-8, we can't guarantee that SOAP4R
supports any encoding sent by caller. add documentation describing how to ensure :string types don't get converted into :base64 by SOAP4R when containing non-ASCII chars and $KCODE is not set to a value. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1822 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/README')
-rw-r--r--actionwebservice/README19
1 files changed, 19 insertions, 0 deletions
diff --git a/actionwebservice/README b/actionwebservice/README
index a725f9db71..5b82475fe2 100644
--- a/actionwebservice/README
+++ b/actionwebservice/README
@@ -215,6 +215,25 @@ custom types and message definition types:
The default namespace used is 'urn:ActionWebService', if you don't supply
one.
+
+== ActionWebService and UTF-8
+
+If you're going to be sending back strings containing non-ASCII UTF-8
+characters using the <tt>:string</tt> data type, you need to make sure that
+Ruby is using UTF-8 as the default encoding for its strings.
+
+The default in Ruby to use US-ASCII encoding for strings, which causes a string
+validation check in the Ruby SOAP library to fail and your string to be sent
+back as a Base-64 value, which may confuse clients that expected strings
+because of the WSDL.
+
+Two ways of doing setting the default string encoding are:
+
+* Start Ruby using the <tt>-Ku</tt> command-line option to the Ruby executable
+* Set the <tt>$KCODE</tt> flag in <tt>config/environment.rb</tt> to the
+ string <tt>'UTF8'</tt>
+
+
== Testing your APIs