Hi,
Does the xwiki work well with the Chinese URI after you mended the
appendCreateLink code?
I think I have a solution to this problem.
I use tomcat 6.0 ,MySQL 5.0 and XE 1.3.1
I configurate the xwiki to UTF-8 env, following this page
However, I add URIEncoding="UTF-8" in $tomcat_home/conf/server.conf,
which I forgot last time.
Then it works. I can add a link with Chinese name in a page also
named in Chinese correctly.
The search in Chinese works too.
On Thu, Apr 10, 2008 at 5:00 AM, LiDan <henduonian(a)hotmail.com> wrote:
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…
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…
Sent from the XWiki- Dev mailing list archive at
Nabble.com.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs