Problem of french characters in URL

235 views
Skip to first unread message

bass

unread,
May 3, 2012, 6:08:16 AM5/3/12
to const...@googlegroups.com
Hi,

We are indexing files via FileConnector, and we have some problems with french characters in URL:

For example, with no special characters, all is working fine:
file://HOSTNAME/Documents%20client/test1.doc

But on this example, the link won't open:
file://HOSTNAME/Réponse/Reponse_références.ppt

Obviously, the problem is  Ã© which should be é

the startup of constellio is using " -Dfile.encoding=UTF8"

Do you have any idea?

Thanks!

Jimmy Duchesne

unread,
May 6, 2012, 2:51:00 PM5/6/12
to const...@googlegroups.com
I'm having this issue too.

Any help would be appreciated.

Jimmy.

bass

unread,
Aug 30, 2012, 4:14:26 AM8/30/12
to const...@googlegroups.com
Hi

We are still facing this issue, any idea or progress on correcting this one?

This is really blocking us in using the product.. 

Thank you for your help.

France Labs

unread,
Aug 30, 2012, 8:11:11 AM8/30/12
to const...@googlegroups.com
Hi,
 
have you tried the following:
- In the Constellio code, in the wicket code (com.doculibre.constellio.wicket.panels.results.DefaultSearchResultPanel), manually handle the decoding of your doc_url which is stored in Constellio in UTF-8. Use the standard decode method for that. That should do the trick, ie at display time (hence the wicket), you get the raw doc_url which corresponds to the actual file share link, while still storing the doc_url as UTF-8 in Constellio.
 
This method requires you to have a dev environnment.
 
Regards,
 
Cedric

Frédéric POUGNAULT

unread,
Sep 6, 2012, 11:00:18 AM9/6/12
to const...@googlegroups.com
Hello,

I don't know if it is the best solution but I used CharSetUtils.urlDecode with UTF-8 and the french characters are display correctly

Frédéric POUGNAULT

unread,
Sep 6, 2012, 11:27:28 AM9/6/12
to const...@googlegroups.com
In the file com.doculibre.constellio.wicket.panels.results.DefaultSearchResultPanel.java

At line 163 : I replaced "summaryLabel = new Label("summary", summary);"

by

 if (protocol.matches("file")) {
                summaryLabel = new Label("summary", CharSetUtils.urlDecode(summary,CharSetUtils.UTF_8));
        } else {
                summaryLabel = new Label("summary", summary);
        }

At line 172 : I replaced       "titleLink = new ExternalLink("titleLink", displayURL);"

by
 if (protocol.matches("file")) {
                titleLink = new ExternalLink("titleLink", CharSetUtils.urlDecode(displayURL,CharSetUtils.UTF_8));
        } else {
                titleLink = new ExternalLink("titleLink", displayURL);
        }

At line 233 I replaced : " add(new Label("url", displayURL));"

by

if (protocol.matches("file")) {
                add(new Label("url", (CharSetUtils.urlDecode(displayURL,CharSetUtils.UTF_8));
        } else {
                add(new Label("url", displayURL));
        }
This three modifications allow to show title, summary and url with french characters

bass

unread,
Sep 14, 2012, 4:40:00 AM9/14/12
to const...@googlegroups.com
Nice correction, will it be included in next binary distribution?

Rida Benjelloun

unread,
Sep 18, 2012, 4:04:46 PM9/18/12
to const...@googlegroups.com

Yes, the issue has been created in Jira, and the fix will be available in 2.0 version.
Regards








--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes Constellio.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msg/constellio/-/lB3J5rjxTKgJ.
Pour envoyer un message à ce groupe, adressez un e-mail à const...@googlegroups.com.
Pour vous désabonner de ce groupe, envoyez un e-mail à l'adresse constellio+...@googlegroups.com.
Pour plus d'options, consultez la page de ce groupe : http://groups.google.com/group/constellio?hl=fr

Nicolas Bélisle

unread,
Sep 19, 2012, 3:34:51 AM9/19/12
to const...@googlegroups.com
Hi,

I updated the binaries yesterday. The URL generated for the File Connector should now be valid (according to my tests).
Also, we recently merged the branch 1.3 with the trunk. A lot of updates came in.

Regards, 

Nicolas

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes Constellio.

Olivier LECLERCQ

unread,
Oct 3, 2012, 9:45:21 AM10/3/12
to const...@googlegroups.com
Bonjour Nicolas,

J'ai comparé le packaging de la 1.3.1 (Revision 976: /constellio/tags/1.3.1/packaging) avec l'install de la 1.3 ... je pensais trouver les binaires  avec la modif sur les URL ... winmerge me dit que c'est idem :( ... Existe-t-il un binaire avec cette modif en attendant la 2.0 ? ... Sinon comment fait-on pour compiler ? un petit ant build.xml ? Sinon comment fait-on pour passer d'une version à un autre.... alors qu'on a un répertoire constellio_derby ~2Go ?

Désolé pour toutes ces questions !!!

Regards
:Ol

Nicolas Bélisle

unread,
Oct 3, 2012, 9:57:16 AM10/3/12
to const...@googlegroups.com
Le build.xml a deux target : 
"package_dist" pour la distribution binaire ou "package_installer" pour la version avec visuel d'installation. 

Pour les problèmes d'encodage, comme ils proviennent du connecteur et devraient donc être corrigés à ce niveau. Selon mes tests, le problème serait réglé dans la dernière version du svn. 

Salutations, 

Nicolas


2012/10/3 Olivier LECLERCQ <olivier.l...@gmail.com>
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msg/constellio/-/9HQniq2Vg5IJ.
Reply all
Reply to author
Forward
0 new messages