TitleFail to attach a file to a page with multibyte page name
Date28-Oct-2005 08:01:21 EEST
Version2.2.23
Submitter148.87.1.171
Bug criticalityMediumBug
Browser versionIE6.0
Bug statusClosedBug
PageProvider used
Servlet Container
Operating SystemWindows 2000
URL
Java version

Steps:

  • create a page with multibyte page name
  • attach a file to the page

Results:

  • In the Add Attachment page, the page name becomes question marks like:
"http://sandbox.jspwiki.org/Upload.jsp?page=??-???"
  • Uploading a file will fail with the following error:
File could not be opened.

Works for me, even in sandbox.jspwiki.org. Downgrading. Anyone else have problems with IE?

-- JanneJalkanen


My IE is Chinese native version. Please see the attachments: 1.gif and 2.gif.

-- ttao

Strange. Do you perhaps have your encoding set to Big-5 or something? Go to the settings menu (or something, I don't have an IE handy), and change the encoding to "auto" or "UTF-8" and let me know what happens.

-- JanneJalkanen

The default encoding is UTF-8.

I know what happened. The javascript:window.open function in IE regards URLs as URL encoded. It decoded them by default. To fix this, please use the javascript escape function to encode the page name like this:

<a href="javascript:window.open('Upload.jsp?page=%E4%B8%AD%E6%96%87','Upload','width=640,height=480,toolbar=1,menubar=1,scrollbars=1,resizable=1,').focus()">Attach file...</a>

-->

<a href="javascript:window.open('Upload.jsp?page='+escape('%E4%B8%AD%E6%96%87'),'Upload','width=640,height=480,toolbar=1,menubar=1,scrollbars=1,resizable=1,').focus()">Attach file...</a>

To avoid breaking the behaviors in other browsers, the change should be restricted within IE.

-- ttao

Side remark : don't use escape() , use encodeURI() instead. See this article --DF

No longer an issue in the 2.3 series; we are not using the javascript popup window anymore.

-- JanneJalkanen

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-11) was last changed on 13-Apr-2006 23:21 by Janne Jalkanen