cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "roy huang" <>
Subject Re: [Help]How can I use non-ascii file name?
Date Thu, 02 Sep 2004 11:13:49 GMT
After reading all the following mail,I finally using flowscript to solve this problem(thought
I don't like this way)
   <map:match pattern="images">
    <map:call function="display" >
   <map:match pattern="*.jpg">
    <map:read mime-type="image/jpg" src="jpg/花.jpg" />
function display(){

it works,if you want to decode it,you can also :

Thought,I don't like this way,just post it hope it is helpful for somebody.

Roy Huang
----- Original Message ----- 
From: "roy huang" <>
To: <>; <>
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
View raw message