After test today, I belived this is a bug and I filed a JIRA issue
http://jira.xwiki.org/jira/browse/XWIKI-2297
What I do now is to modify the
com.xpn.xwiki.render.XWikiRadeoxRenderEngine.java and replace the class
file.
in function 'public void appendCreateLink(StringBuffer buffer, String name,
String view)'
do following changes
 
String querystring = null;
            String parentencoded = null;
            XWikiDocument currentdoc = context.getDoc();
            if (currentdoc!=null) {
                try {
                   
parentencoded=URLEncoder.encode(currentdoc.getFullName());
                } catch (Exception e) {
                        parentencoded=currentdoc.getFullName();
                }
                querystring = "parent=" + parentencoded;
            }



LiDan wrote:
> 
> This is the second time I ask this question, because maybe last time I
> didn't describe it clearly. I hope someone can help me on this.
> 
> I have created a utf-8 wiki and set Chinese as the default langauage. I
> met 3 main encoding problems:
> 
> 1. When I created a link with Chinese name in  a page also named in
> Chinese. I found that the ULR of the link was like"
> /xwiki/bin/edit/Main/%E6%B5%8B%E8%AF%951?parent=Main.测试&editor=wysiwyg",
> the main part is UTF-8 encoded, but the parent param is in original
> Chinese encoding, means two endcodings for one URL. The consequence was
> that when I clicked the link to edit the new page, the parent link is
> ill-formated, and could not find the correct parent. I checked this forum,
> and found that someone had met it before, but it was supposed to be
> resolved, see
> http://www.nabble.com/Non-ascii-characters-in-doc-names%2C-need-advices-for-patch-td9007198.html#a9007198
> This problem only in IE6 and IE7, in firefox it's OK, because in firefox
> only one encoding in the URL.
> I have tried both xwiki 1.2 and 1.3, same problem.
> 
> 2. When I use export function, all the pages and spaces with Chinese name
> are ill-named in the xar pack.
> 
> 3. On the logs in CMD window of XWiki, all the Chinese words can not
> display correctly.
> 
> Please someone help me to fix the problems, many thanks.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Encoding-problem-of-UTF-8-wiki%2C-especially-with-non-english-URL-tp16539207p16596606.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to