Hi again,
On Thu, 2005-11-24 at 20:30 +0100, Christian Niessner wrote:
> Okay, it seems that something can't handle my special char and it
> gets replaced with a simple ?.
I debugged a bit and found the Problem (at least for JavaRPC) in
JavaDataSource.java#223:
It says:
XmlRpcRequest xr = new LZXmlRpcRequestProcessor()
.processRequest(new ByteArrayInputStream(postbody.getBytes()));
The call to .getBytes() is the bad guy. getBytes() converts the string
with jvm default charset, and it defaults to ASCII (at least on
linux/jdk1.4). So all UTF-8 encoded chars get lost...
I tried to find a way to change the JVM default charset, but found
nothing. Did i miss something?
So i changed the line to:
xr = new LZXmlRpcRequestProcessor()
.processRequest(new ByteArrayInputStream(
postbody.getBytes(req.getCharacterEncoding())));
and now it works for me. I don't know if req.getCharacterEncoding() or
a fixed "UTF-8" is the right way.
I also tried to debug the XML-RPC path. It seems that the data is
okay till it enters commons.httpclient. But later, on the network
layer, its mixed up. Maybe commons.httpclient encoding is not
initialized properly. (wrong charset set?)
Somebody had similar problems / expiriences?
Thanks & ciao,
chris
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user