sdx-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sdx-developers] Fw: Re[2]: [sdx-users] UTF-8 and ISO8859-1


From: Pierrick Brihaye
Subject: [sdx-developers] Fw: Re[2]: [sdx-users] UTF-8 and ISO8859-1
Date: Sun, 18 Jan 2004 11:12:04 +0100

Salut,


Je vous transmets le mail suivant pour examen.

1) je vous renvoie versle message arrivé cette nuit :
http://issues.apache.org/eyebrowse/address@hidden&msgNo=6470

Il faudrait donc peut-être changer la version de Luke.

2) je ne connais absolument pas les documents tels qu'il sont produits par
la chaîne Cyberdocs. J'ai juste remarqué qu'il y avait des xsl:output en
ISO-8859-1 un peu partout, ce qui expliquerait l'utilisation des entités
caractères.

3) en ce qui concerne le problème du char, je ne pense pas que ça en soit
un. Mais, par acquit de conscience, je vais tout de même vérifier, en
particulier dans les logicsheets.

A+

p.b.

----- Original Message ----- 
From: "Ivan Kozlov" <address@hidden>
To: "Pierrick Brihaye" <address@hidden>
Sent: Sunday, January 18, 2004 10:23 AM
Subject: Re[2]: [sdx-users] UTF-8 and ISO8859-1


> Hello Pierrick,
>
> Saturday, January 17, 2004, 11:47:13 PM, you wrote:
>
> PB> The best way to ckeck it is to launch the luke*.jar file provided with
SDX :
> PB> it is a Lucene index viewer.
> java -jar luke-0.4.jar gives such exeption:
>
> java.lang.NoClassDefFoundError: org/apache/lucene/store/Directory
> Exception in thread "main"
>
>
> PB> Where ? What kind of HTMl code is sent to your browser ?
>
> PB> You could also log in a an admin and, instead of viewing an
> PB> http://localhost;8080/sdx/your_app/your_page.xsp URL, try to view the
> PB> "magic" http://localhost;8080/sdx/your_app/your_page.xsp2sdx.
>
> Wow, its quite interesting. I got that page:
> <?xml version="1.0"?>
> <sdx:document xmlns:xsp="http://apache.org/xsp";
xmlns:sdx="http://www.culture.gouv.fr/ns/sdx/sdx"; xml:lang="ru-RU"
server="http://localhost:8080/sdx";
api-url="http://localhost:8080/sdx/sdx/api-url"; app="org.cyberdocs.demo"
appbypath="pcd" uri="http://localhost:8080/sdx/pcd/rsimple.xsp2sdx";
query="?q=%26%231075%3B%26%231086%3B%26%231088%3B%26%231086%3B&amp;base=docu
ments" version="2.2" build="2004011701" date="Sun Jan 18 11:55:43 MSK 2004">
> <bandeau xmlns:xsp-pcd="http://cyberdocs.org/pcd/ns/xsp/1.0";
xmlns:c-pcd="http://cyberdocs.org/pcd/ns/contenu/1.0";
xmlns:nav="http://ajlsm.com/sdx/navigation/cbe/1.0";
xmlns:xsp-nav="http://ajlsm.com/sdx/xsp-navigation"/>
> <c-pcd:config xmlns:c-pcd="http://cyberdocs.org/pcd/ns/contenu/1.0";
xmlns:xsp-pcd="http://cyberdocs.org/pcd/ns/xsp/1.0";
xmlns:nav="http://ajlsm.com/sdx/navigation/cbe/1.0";
xmlns:xsp-nav="http://ajlsm.com/sdx/xsp-navigation";>
> <c-pcd:param nom="url-accueil">.</c-pcd:param>
>
> .... (nothing interesting)
>
>
> <suppr/>
> <resultats type="simple" xsp="rsimple.xsp">
> <barre/>
> <barre-res/>
> <sdx:results qid="pcd-q" page="0" hpp="10" pages="0" nb="0" start="0"
end="0" id="pcd-q" currentPage="0" nbPages="0">
> <sdx:query type="simple" engine="lucene" luceneQuery=""
escapedLuceneQuery="" text="&amp;#1075;&amp;#1086;&amp;#1088;&amp;#1086;"
escapedText="%26%231075%3B%26%231086%3B%26%231088%3B%26%231086%3B" op="or"/>
> <sdx:sort/>
> </sdx:results>
> </resultats>
> </c-pcd:page>
> <sdx:user id="admin" admin="true" app="org.cyberdocs.demo" ip="127.0.0.1"
host="localhost" xml:lang="ru-RU">
> <sdx:group id="admins"/>
> </sdx:user>
> <sdx:parameters>
> <sdx:parameter type="get" name="base" value="documents"
escapedValue="documents"/>
> <sdx:parameter type="get" name="q"
value="&amp;#1075;&amp;#1086;&amp;#1088;&amp;#1086;"
escapedValue="%26%231075%3B%26%231086%3B%26%231088%3B%26%231086%3B"/>
> <sdx:parameter type="session" name="pcd-q"
value="address@hidden"/>
> <sdx:parameter type="session" name="sdx_user"
value="address@hidden"/>
> </sdx:parameters>
> </sdx:document>
>
> As you see querry value is replased by something. Oh, i forgot, in SDX
> fist page, when you adding Admin, if you write his name in russian, it
> will be looked like this...
>
>
> >>And to fix it I should change "StringBuffer" to "ByteArrayOutputStream":
>
> PB> Did you see such a coding mistake in SDX' one ? I didn't... but I may
be
> PB> wrong.
>
> Yes, ive seen such a constructions in some SDX source files...
> Ex:
> \src\java\fr\gouv\culture\sdx\search\lucene\query\AbstractQuery.java #203
> StringBuffer s = new StringBuffer();
> for (int i=0; i<q.length(); i++)
> {
>     char c = q.charAt(i);
>     if ( c == '-' )
>        if ( i == 0 ) s.append(c);
>        else if ( s.charAt(i-1) == ' ' ) s.append(c);
>        else s.append(' ');
>     else s.append(c);
> }
> return s.toString();
>
>
>
>
>
> -- 
> Best regards,
>  Ivan                            mailto:address@hidden
>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]