After reading all the following mail,I finally using flowscript to solve this problem(thought I don't like this way) sitemap: <map:match pattern="images"> <map:call function="display" > </map:call> </map:match> <map:match pattern="*.jpg"> <map:read mime-type="image/jpg" src="jpg/è.jpg" /> </map:match> flowscript: function display(){ name=cocoon.request.getParameter("name"); name1=new Packages.java.lang.String(name); cocoon.sendPage(name1); }
it works,if you want to decode it,you can also : name2=new Packages.java.lang.String(name1.getBytes("ISO-8859-1")); Thought,I don't like this way,just post it hope it is helpful for somebody. Roy Huang ----- Original Message ----- From: "roy huang" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, August 12, 2004 7:45 PM Subject: [Help]How can I use non-ascii file name? > Hi,all: > Use reader to display jpg or gif is quite simple,like: > <map:match pattern="*.jpg"> > <map:read mime-type="image/jpg" src="jpg/{1}.jpg" /> > </map:match> > But if the file name is not ASCII but utf-8 or other encoding like è.jpg > (simplified Chinese),the resolver didn't resolve the name correctly,error occur: > org.apache.cocoon.ResourceNotFoundException: Error during resolving of the input > stream: org.apache.excalibur.source.SourceNotFoundException: file:/C:/My > Documents/IBM/wsad/workspace/PowerOA/WebContent/test/jpg/ÃÂÂ.jpg doesn't exist. > > How can I use non-ASCII file name in cocoon?I can't find any description or help in > wiki or archived mail list. > > Roy Huang