[xwiki-users] include problem with french characters
Hello, The include function is to hard to use with some non-us character like french: éèà'ç ... By example, I have a document with this section: = Level1 - Séct-io'n 4 = Bla bla if I want to include this section: Level1 - Séct-io'n 4 I must use this include {{include reference=Pagefille2 section=HLevel1-SE9ct-io27n4/}} I must replace special character with unicode code: http://www.utf8-chartable.de/ I can use another way? I must open a bug on http://jira.xwiki.org/ ? NB: anchor doesn't work with include. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] include problem with french characters
Hi Bastien, You shouldn't have problems with French characters. Maybe it's only a matter of configuration of your wiki? Did you look the following page? http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding Sincerely, -- Jean On mer., 2014-05-28 at 13:43 +0100, Pascal BASTIEN wrote: Hello, The include function is to hard to use with some non-us character like french: éèà'ç ... By example, I have a document with this section: = Level1 - Séct-io'n 4 = Bla bla if I want to include this section: Level1 - Séct-io'n 4 I must use this include {{include reference=Pagefille2 section=HLevel1-SE9ct-io27n4/}} I must replace special character with unicode code: http://www.utf8-chartable.de/ I can use another way? I must open a bug on http://jira.xwiki.org/ ? NB: anchor doesn't work with include. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] include problem with french characters
I already read (and apply) the encoding instruction (for the search forms). Thxs anyway The problem is the automatic section creation with title 1, 2 etc. If I look the source of a section with firebug, it display this anchor: h1 id=HLevel1-SE9ct-io27n4 spanLevel1 - Séct-io'n 4/span /h1 De : Jean SIMARD jean.sim...@xwiki.com À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org Envoyé le : Mercredi 28 mai 2014 16h51 Objet : Re: [xwiki-users] include problem with french characters Hi Bastien, You shouldn't have problems with French characters. Maybe it's only a matter of configuration of your wiki? Did you look the following page? http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding Sincerely, -- Jean On mer., 2014-05-28 at 13:43 +0100, Pascal BASTIEN wrote: Hello, The include function is to hard to use with some non-us character like french: éèà'ç ... By example, I have a document with this section: = Level1 - Séct-io'n 4 = Bla bla if I want to include this section: Level1 - Séct-io'n 4 I must use this include {{include reference=Pagefille2 section=HLevel1-SE9ct-io27n4/}} I must replace special character with unicode code: http://www.utf8-chartable.de/ I can use another way? I must open a bug on http://jira.xwiki.org/ ? NB: anchor doesn't work with include. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] include problem with french characters
Something we could do is allowing to customize the id (and not generate one in this case) like in: (%id=mycustomid%)= Level1 - Séct-io'n 4 = On Wed, May 28, 2014 at 5:33 PM, Pascal BASTIEN pbasnews-xw...@yahoo.fr wrote: I already read (and apply) the encoding instruction (for the search forms). Thxs anyway The problem is the automatic section creation with title 1, 2 etc. If I look the source of a section with firebug, it display this anchor: h1 id=HLevel1-SE9ct-io27n4 spanLevel1 - Séct-io'n 4/span /h1 De : Jean SIMARD jean.sim...@xwiki.com À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org Envoyé le : Mercredi 28 mai 2014 16h51 Objet : Re: [xwiki-users] include problem with french characters Hi Bastien, You shouldn't have problems with French characters. Maybe it's only a matter of configuration of your wiki? Did you look the following page? http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding Sincerely, -- Jean On mer., 2014-05-28 at 13:43 +0100, Pascal BASTIEN wrote: Hello, The include function is to hard to use with some non-us character like french: éèà'ç ... By example, I have a document with this section: = Level1 - Séct-io'n 4 = Bla bla if I want to include this section: Level1 - Séct-io'n 4 I must use this include {{include reference=Pagefille2 section=HLevel1-SE9ct-io27n4/}} I must replace special character with unicode code: http://www.utf8-chartable.de/ I can use another way? I must open a bug on http://jira.xwiki.org/ ? NB: anchor doesn't work with include. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] include problem with french characters
Actually this is already working, just not using the right syntax :) (%id=mycustomid%) = Level1 - Séct-io'n 4 = On Wed, May 28, 2014 at 5:47 PM, Thomas Mortagne thomas.morta...@xwiki.com wrote: Something we could do is allowing to customize the id (and not generate one in this case) like in: (%id=mycustomid%)= Level1 - Séct-io'n 4 = On Wed, May 28, 2014 at 5:33 PM, Pascal BASTIEN pbasnews-xw...@yahoo.fr wrote: I already read (and apply) the encoding instruction (for the search forms). Thxs anyway The problem is the automatic section creation with title 1, 2 etc. If I look the source of a section with firebug, it display this anchor: h1 id=HLevel1-SE9ct-io27n4 spanLevel1 - Séct-io'n 4/span /h1 De : Jean SIMARD jean.sim...@xwiki.com À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org Envoyé le : Mercredi 28 mai 2014 16h51 Objet : Re: [xwiki-users] include problem with french characters Hi Bastien, You shouldn't have problems with French characters. Maybe it's only a matter of configuration of your wiki? Did you look the following page? http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding Sincerely, -- Jean On mer., 2014-05-28 at 13:43 +0100, Pascal BASTIEN wrote: Hello, The include function is to hard to use with some non-us character like french: éèà'ç ... By example, I have a document with this section: = Level1 - Séct-io'n 4 = Bla bla if I want to include this section: Level1 - Séct-io'n 4 I must use this include {{include reference=Pagefille2 section=HLevel1-SE9ct-io27n4/}} I must replace special character with unicode code: http://www.utf8-chartable.de/ I can use another way? I must open a bug on http://jira.xwiki.org/ ? NB: anchor doesn't work with include. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] include problem with french characters
I understand the constraint by ID specification. In this case idGenerator.generateUniqueId must remove all character not in [A-Za-z0-9:_.-] regexp and add -1 if we have twice the same heading It will be simpler for user I think. ... or better (but more complexe for developper) replace à by a, ç by c etc. I will propose that at JIRA. Thxs. De : vinc...@massol.net vinc...@massol.net À : XWiki Users users@xwiki.org Envoyé le : Mercredi 28 mai 2014 17h25 Objet : Re: [xwiki-users] include problem with french characters Hi Pascal, Internally we generate an anchor id based on the heading text: /** * Generate a unique id attribute using the passed text as the seed value. The generated id complies with the XHTML * specification. Extract from a href=http://www.w3.org/TR/xhtml1/#C_8;XHTML RFC/a: * p * code When defining fragment identifiers to be backward-compatible, only strings matching the pattern * [A-Za-z][A-Za-z0-9:_.-]* should be used./code * /p * * @param prefix the prefix of the identifier. Has to match [a-zA-Z]. * @param text the text used to generate the unique id * @return the unique id. For example Hello world will generate prefix + Helloworld. */ public String generateUniqueId(String prefix, String text) Called with: id = idGenerator.generateUniqueId(H, text); This is why for the text “Level1 - Séct-io'n 4” we generate “HLevel1-SE9ct-io27n4 What we could do though is allow the user to enter the heading text instead of the id and generate the id internally. However there’s stil the issue that generateUniqueId will generate a unique id (if you have twice the same heading, the second heading id will have “-1” suffixed.. In any case I agree it’s not user-friendly for this use case but also when specifying the anchor in the wiki link syntax and you should open a JIRA issue IMO. Thanks -Vincent On 28 May 2014 at 14:50:28, Pascal BASTIEN (pbasnews-xw...@yahoo.fr(mailto:pbasnews-xw...@yahoo.fr)) wrote: Hello, The include function is to hard to use with some non-us character like french: éèà'ç ... By example, I have a document with this section: = Level1 - Séct-io'n 4 = Bla bla if I want to include this section: Level1 - Séct-io'n 4 I must use this include {{include reference=Pagefille2 section=HLevel1-SE9ct-io27n4/}} I must replace special character with unicode code: http://www.utf8-chartable.de/ I can use another way? I must open a bug on http://jira.xwiki.org/ ? NB: anchor doesn't work with include. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] include problem with french characters
Yes hyperlink with anchor work with (%id=mycustomid%) but not the include section function. Then the problem is the include instruction: it didn't work if the id is not Hx? My test: I have 2 pages: My master page - Test d'include fille {{include document=fille section=Htitre1/}} this include working well {{include document=fille section=mycustomid/}} this include doesn't work My child page -= titre 1 = bla bla titre source is id=Htitre1 (%id=mycustomid%) = Level1 - Séct-io'n 4 = Bla bla Séct-io'n 4 source is id=mycustomid = titre 2 = blabla 2 De : Thomas Mortagne thomas.morta...@xwiki.com À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org Cc : Jean SIMARD jean.sim...@xwiki.com Envoyé le : Mercredi 28 mai 2014 17h48 Objet : Re: [xwiki-users] include problem with french characters Actually this is already working, just not using the right syntax :) (%id=mycustomid%) = Level1 - Séct-io'n 4 = On Wed, May 28, 2014 at 5:47 PM, Thomas Mortagne thomas.morta...@xwiki.com wrote: Something we could do is allowing to customize the id (and not generate one in this case) like in: (%id=mycustomid%)= Level1 - Séct-io'n 4 = On Wed, May 28, 2014 at 5:33 PM, Pascal BASTIEN pbasnews-xw...@yahoo.fr wrote: I already read (and apply) the encoding instruction (for the search forms). Thxs anyway The problem is the automatic section creation with title 1, 2 etc. If I look the source of a section with firebug, it display this anchor: h1 id=HLevel1-SE9ct-io27n4 spanLevel1 - Séct-io'n 4/span /h1 De : Jean SIMARD jean.sim...@xwiki.com À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org Envoyé le : Mercredi 28 mai 2014 16h51 Objet : Re: [xwiki-users] include problem with french characters Hi Bastien, You shouldn't have problems with French characters. Maybe it's only a matter of configuration of your wiki? Did you look the following page? http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding Sincerely, -- Jean On mer., 2014-05-28 at 13:43 +0100, Pascal BASTIEN wrote: Hello, The include function is to hard to use with some non-us character like french: éèà'ç ... By example, I have a document with this section: = Level1 - Séct-io'n 4 = Bla bla if I want to include this section: Level1 - Séct-io'n 4 I must use this include {{include reference=Pagefille2 section=HLevel1-SE9ct-io27n4/}} I must replace special character with unicode code: http://www.utf8-chartable.de/ I can use another way? I must open a bug on http://jira.xwiki.org/ ? NB: anchor doesn't work with include. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] include problem with french characters
On 28 May 2014 at 18:21:31, Pascal BASTIEN (pbasnews-xw...@yahoo.fr(mailto:pbasnews-xw...@yahoo.fr)) wrote: Yes hyperlink with anchor work with (%id=mycustomid%) but not the include section function. Yep it’ll not work with the include macro since the code just check for the ids of HeadingBlocks. Thanks -Vincent Then the problem is the include instruction: it didn't work if the id is not Hx? My test: I have 2 pages: My master page - Test d'include fille {{include document=fille section=Htitre1/}} this include working well {{include document=fille section=mycustomid/}} this include doesn't work My child page -= titre 1 = bla bla titre source is id=Htitre1 (%id=mycustomid%) = Level1 - Séct-io'n 4 = Bla bla Séct-io'n 4 source is id=mycustomid = titre 2 = blabla 2 De : Thomas Mortagne À : Pascal BASTIEN ; XWiki Users Cc : Jean SIMARD Envoyé le : Mercredi 28 mai 2014 17h48 Objet : Re: [xwiki-users] include problem with french characters Actually this is already working, just not using the right syntax :) (%id=mycustomid%) = Level1 - Séct-io'n 4 = On Wed, May 28, 2014 at 5:47 PM, Thomas Mortagne wrote: Something we could do is allowing to customize the id (and not generate one in this case) like in: (%id=mycustomid%)= Level1 - Séct-io'n 4 = On Wed, May 28, 2014 at 5:33 PM, Pascal BASTIEN wrote: I already read (and apply) the encoding instruction (for the search forms). Thxs anyway The problem is the automatic section creation with title 1, 2 etc. If I look the source of a section with firebug, it display this anchor: Level1 - Séct-io'n 4 De : Jean SIMARD À : Pascal BASTIEN ; XWiki Users Envoyé le : Mercredi 28 mai 2014 16h51 Objet : Re: [xwiki-users] include problem with french characters Hi Bastien, You shouldn't have problems with French characters. Maybe it's only a matter of configuration of your wiki? Did you look the following page? http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding Sincerely, -- Jean On mer., 2014-05-28 at 13:43 +0100, Pascal BASTIEN wrote: Hello, The include function is to hard to use with some non-us character like french: éèà'ç ... By example, I have a document with this section: = Level1 - Séct-io'n 4 = Bla bla if I want to include this section: Level1 - Séct-io'n 4 I must use this include {{include reference=Pagefille2 section=HLevel1-SE9ct-io27n4/}} I must replace special character with unicode code: http://www.utf8-chartable.de/ I can use another way? I must open a bug on http://jira.xwiki.org/ ? NB: anchor doesn't work with include. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] include problem with french characters
On Wed, May 28, 2014 at 5:58 PM, Pascal BASTIEN pbasnews-xw...@yahoo.fr wrote: I understand the constraint by ID specification. In this case idGenerator.generateUniqueId must remove all character not in [A-Za-z0-9:_.-] regexp and add -1 if we have twice the same heading There is a reason why we don't do this, imagine a content in Chinese or any other non Latin locale. It will be simpler for user I think. ... or better (but more complexe for developper) replace à by a, ç by c etc. I will propose that at JIRA. Thxs. De : vinc...@massol.net vinc...@massol.net À : XWiki Users users@xwiki.org Envoyé le : Mercredi 28 mai 2014 17h25 Objet : Re: [xwiki-users] include problem with french characters Hi Pascal, Internally we generate an anchor id based on the heading text: /** * Generate a unique id attribute using the passed text as the seed value. The generated id complies with the XHTML * specification. Extract from a href=http://www.w3.org/TR/xhtml1/#C_8;XHTML RFC/a: * p * code When defining fragment identifiers to be backward-compatible, only strings matching the pattern * [A-Za-z][A-Za-z0-9:_.-]* should be used./code * /p * * @param prefix the prefix of the identifier. Has to match [a-zA-Z]. * @param text the text used to generate the unique id * @return the unique id. For example Hello world will generate prefix + Helloworld. */ public String generateUniqueId(String prefix, String text) Called with: id = idGenerator.generateUniqueId(H, text); This is why for the text “Level1 - Séct-io'n 4” we generate “HLevel1-SE9ct-io27n4 What we could do though is allow the user to enter the heading text instead of the id and generate the id internally. However there’s stil the issue that generateUniqueId will generate a unique id (if you have twice the same heading, the second heading id will have “-1” suffixed.. In any case I agree it’s not user-friendly for this use case but also when specifying the anchor in the wiki link syntax and you should open a JIRA issue IMO. Thanks -Vincent On 28 May 2014 at 14:50:28, Pascal BASTIEN (pbasnews-xw...@yahoo.fr(mailto:pbasnews-xw...@yahoo.fr)) wrote: Hello, The include function is to hard to use with some non-us character like french: éèà'ç ... By example, I have a document with this section: = Level1 - Séct-io'n 4 = Bla bla if I want to include this section: Level1 - Séct-io'n 4 I must use this include {{include reference=Pagefille2 section=HLevel1-SE9ct-io27n4/}} I must replace special character with unicode code: http://www.utf8-chartable.de/ I can use another way? I must open a bug on http://jira.xwiki.org/ ? NB: anchor doesn't work with include. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] include problem with french characters
K thanks for your answer. I just opened a bug about it: http://jira.xwiki.org/browse/XWIKI-10392 De : Thomas Mortagne thomas.morta...@xwiki.com À : Pascal BASTIEN pbasnews-xw...@yahoo.fr; XWiki Users users@xwiki.org Envoyé le : Mercredi 28 mai 2014 18h35 Objet : Re: [xwiki-users] include problem with french characters On Wed, May 28, 2014 at 5:58 PM, Pascal BASTIEN pbasnews-xw...@yahoo.fr wrote: I understand the constraint by ID specification. In this case idGenerator.generateUniqueId must remove all character not in [A-Za-z0-9:_.-] regexp and add -1 if we have twice the same heading There is a reason why we don't do this, imagine a content in Chinese or any other non Latin locale. It will be simpler for user I think. ... or better (but more complexe for developper) replace à by a, ç by c etc. I will propose that at JIRA. Thxs. De : vinc...@massol.net vinc...@massol.net À : XWiki Users users@xwiki.org Envoyé le : Mercredi 28 mai 2014 17h25 Objet : Re: [xwiki-users] include problem with french characters Hi Pascal, Internally we generate an anchor id based on the heading text: /** * Generate a unique id attribute using the passed text as the seed value. The generated id complies with the XHTML * specification. Extract from a href=http://www.w3.org/TR/xhtml1/#C_8;XHTML RFC/a: * p * code When defining fragment identifiers to be backward-compatible, only strings matching the pattern * [A-Za-z][A-Za-z0-9:_.-]* should be used./code * /p * * @param prefix the prefix of the identifier. Has to match [a-zA-Z]. * @param text the text used to generate the unique id * @return the unique id. For example Hello world will generate prefix + Helloworld. */ public String generateUniqueId(String prefix, String text) Called with: id = idGenerator.generateUniqueId(H, text); This is why for the text “Level1 - Séct-io'n 4” we generate “HLevel1-SE9ct-io27n4 What we could do though is allow the user to enter the heading text instead of the id and generate the id internally. However there’s stil the issue that generateUniqueId will generate a unique id (if you have twice the same heading, the second heading id will have “-1” suffixed.. In any case I agree it’s not user-friendly for this use case but also when specifying the anchor in the wiki link syntax and you should open a JIRA issue IMO. Thanks -Vincent On 28 May 2014 at 14:50:28, Pascal BASTIEN (pbasnews-xw...@yahoo.fr(mailto:pbasnews-xw...@yahoo.fr)) wrote: Hello, The include function is to hard to use with some non-us character like french: éèà'ç ... By example, I have a document with this section: = Level1 - Séct-io'n 4 = Bla bla if I want to include this section: Level1 - Séct-io'n 4 I must use this include {{include reference=Pagefille2 section=HLevel1-SE9ct-io27n4/}} I must replace special character with unicode code: http://www.utf8-chartable.de/ I can use another way? I must open a bug on http://jira.xwiki.org/ ? NB: anchor doesn't work with include. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users