You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Philipp Chudinov <mo...@basko.ru> on 2002/09/09 20:33:39 UTC

Xindice XML-RPC & encoding - part II

Well, I've tried jakarta io taglib to create an  XML-RPC call to get a
document from the Xindice. The response looks like follows:

<?xml version="1.0" encoding="ISO-8859-1"?>
<methodResponse><params><param><value>&lt;?xml version="1.0"?&gt;
&lt;wd:webdocument
omitted
        &lt;wd:paragraph&gt;? ????????????? ?????? ?????? ???????
      ????????? ?? ?????????? ? ????? ???????????. ???? ????????
      ????????? ??? ??????? ?????????? ??????????? ? ???????? ?
      ?????????????? ???? ????? ?? ?????? ????????????
      ????????.&lt;/wd:paragraph&gt;
etc.
  </value></param></params></methodResponse>

The problem is that response is in ISO-8859-i enc, and my documents are
UTF-8. Looks like that is why there is so many questions... Could anybody
tell me, what and where should I fix? Please, note, even if I set io taglib
to use UTF-8, it makes no result too...

Phil.


Re: Xindice XML-RPC & encoding - part II

Posted by Philipp Chudinov <mo...@basko.ru>.
Thank you, Tom. I'll try to fix it now.


----- Original Message ----- 
From: "Tom Bradford" <br...@dbxmlgroup.com>
To: <xi...@xml.apache.org>
Sent: Tuesday, September 10, 2002 12:56 AM
Subject: Re: Xindice XML-RPC & encoding - part II


> On Monday, September 9, 2002, at 11:33 AM, Philipp Chudinov wrote:
> > Well, I've tried jakarta io taglib to create an  XML-RPC call to get a
> > document from the Xindice. The response looks like follows:
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> > <methodResponse><params><param><value>&lt;?xml version="1.0"?&gt;
> > &lt;wd:webdocument
> > omitted
> >         &lt;wd:paragraph&gt;? ????????????? ?????? ?????? ???????
> >       ????????? ?? ?????????? ? ????? ???????????. ???? ????????
> >       ????????? ??? ??????? ?????????? ??????????? ? ???????? ?
> >       ?????????????? ???? ????? ?? ?????? ????????????
> >       ????????.&lt;/wd:paragraph&gt;
> > etc.
> >   </value></param></params></methodResponse>
> >
> > The problem is that response is in ISO-8859-i enc, and my documents are
> > UTF-8. Looks like that is why there is so many questions... Could 
> > anybody
> > tell me, what and where should I fix? Please, note, even if I set io 
> > taglib
> > to use UTF-8, it makes no result too...
> 
> I believe that you can tell Helma/Apache XML-RPC which encoding to use 
> when it serializes its output.  Not sure what the API call is though.  
> Setting it to UTF-8 might fix your problem.
> 
> --
> Tom Bradford - CTO - The dbXML Group - http://www.dbxml.com
> Apache Xindice (XML Database) - http://xml.apache.org/xindice
> Labrador (Web Services Hub) - http://www.notdotnet.org/labrador
> 


Re: Xindice XML-RPC & encoding - part II

Posted by Philipp Chudinov <mo...@basko.ru>.
Well, it seems that error is somewhere at the Gateway. Because this code
String r = new String(xmlrpc.execute(gateway.getInputStream()));
              System.out.println("1: "+r);

produce this response
<?xml version="1.0" encoding="ISO-8859-1"?>
etc.
gateway returns InputStream and it seems that it is ISO encoded. I tried to
use Xindice http access, but there is no positive result too (though it
returns no ? signs, but all over symbols except what I need. So, once again,
my documents are utf-8, they content russian letters, when accessing
collection via native api - all works well (viewing via Yab too). But when
trying to access via xml-rpc or http - encoding is broken. I have no idea
what to do, people from apache xml-rpc can not give me any advice too. I use
release version of Xindice.

Phil.

----- Original Message -----
From: "Tom Bradford" <br...@dbxmlgroup.com>
To: <xi...@xml.apache.org>
Sent: Tuesday, September 10, 2002 12:56 AM
Subject: Re: Xindice XML-RPC & encoding - part II


> On Monday, September 9, 2002, at 11:33 AM, Philipp Chudinov wrote:
> > Well, I've tried jakarta io taglib to create an  XML-RPC call to get a
> > document from the Xindice. The response looks like follows:
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> > <methodResponse><params><param><value>&lt;?xml version="1.0"?&gt;
> > &lt;wd:webdocument
> > omitted
> >         &lt;wd:paragraph&gt;? ????????????? ?????? ?????? ???????
> >       ????????? ?? ?????????? ? ????? ???????????. ???? ????????
> >       ????????? ??? ??????? ?????????? ??????????? ? ???????? ?
> >       ?????????????? ???? ????? ?? ?????? ????????????
> >       ????????.&lt;/wd:paragraph&gt;
> > etc.
> >   </value></param></params></methodResponse>
> >
> > The problem is that response is in ISO-8859-i enc, and my documents are
> > UTF-8. Looks like that is why there is so many questions... Could
> > anybody
> > tell me, what and where should I fix? Please, note, even if I set io
> > taglib
> > to use UTF-8, it makes no result too...
>
> I believe that you can tell Helma/Apache XML-RPC which encoding to use
> when it serializes its output.  Not sure what the API call is though.
> Setting it to UTF-8 might fix your problem.
>
> --
> Tom Bradford - CTO - The dbXML Group - http://www.dbxml.com
> Apache Xindice (XML Database) - http://xml.apache.org/xindice
> Labrador (Web Services Hub) - http://www.notdotnet.org/labrador
>


Re: Xindice XML-RPC & encoding - part II

Posted by Tom Bradford <br...@dbxmlgroup.com>.
On Monday, September 9, 2002, at 11:33 AM, Philipp Chudinov wrote:
> Well, I've tried jakarta io taglib to create an  XML-RPC call to get a
> document from the Xindice. The response looks like follows:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <methodResponse><params><param><value>&lt;?xml version="1.0"?&gt;
> &lt;wd:webdocument
> omitted
>         &lt;wd:paragraph&gt;? ????????????? ?????? ?????? ???????
>       ????????? ?? ?????????? ? ????? ???????????. ???? ????????
>       ????????? ??? ??????? ?????????? ??????????? ? ???????? ?
>       ?????????????? ???? ????? ?? ?????? ????????????
>       ????????.&lt;/wd:paragraph&gt;
> etc.
>   </value></param></params></methodResponse>
>
> The problem is that response is in ISO-8859-i enc, and my documents are
> UTF-8. Looks like that is why there is so many questions... Could 
> anybody
> tell me, what and where should I fix? Please, note, even if I set io 
> taglib
> to use UTF-8, it makes no result too...

I believe that you can tell Helma/Apache XML-RPC which encoding to use 
when it serializes its output.  Not sure what the API call is though.  
Setting it to UTF-8 might fix your problem.

--
Tom Bradford - CTO - The dbXML Group - http://www.dbxml.com
Apache Xindice (XML Database) - http://xml.apache.org/xindice
Labrador (Web Services Hub) - http://www.notdotnet.org/labrador