Could you create a diff of the two modified files?  Run it against CVS
HEAD with the diff -u command to produce unidiff output.  Then create a
patch issue at http://scarab.werken.com/issue.  In the description,
please put your example code.  

Oh, make sure that you put it into the turbine->source module...

> -----Original Message-----
> From: John [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 09, 2003 8:57 PM
> To: Turbine Users List
> Subject: localisation of upload service
> 
> 
> Hi all,
>   I am using tutbine2.2 to build an application. The language 
> is chinese. 
>   I have a form(see the following). If I input chinese 
> characters in the "Name" field or other text fields, 
>   I can't get the correct string on the server. If name of 
> the files I upload is in chinese, I can't get the name correctly.
>   I made 2 changes in turbine2.2 to solve the 2 problems.
>   (1) In 
> org.apache.turbine.services.upload.TurbineUploadService.java, 
> I replaced line 210 and 211 with the following codes,
>                             try
>                             {
>                               params.append(getFieldName(headers),
>                                               new 
> String(item.get(),"ISO8859_1"));
>                             }
>                             catch(UnsupportedEncodingException e)
>                             { }
> 
>  (2) In org.apache.turbine.util.upload.MultipartStream.java, 
> line 378, I replaced this line with the following codes,
>                 try
>                 {
>                    buf.append(new String(b,"ISO8859_1"));
>                 }
>                 catch(UnsupportedEncodingException e)
>                 { }
>   
>   I think there should be another ways to solve these 
> problems. Maybe we can only store byte stream to ParameterParser 
>   and let the users to do the encoding conversion. Maybe we 
> should make the convertion in turbine according to the 
>   character information from the request.
> 
> $page.setTitle("Insert")
> 
> <form method="post" enctype="multipart/form-data" 
> action="$link.setPage("MessageIndex.vm").setAction("MessageAgent")">
>   <div align="left">
>     <table bgcolor="#ffffff" cellpadding="2">
>       <tr>
>         #formCell ("User" "user_id" "")
>       </tr>
>       <tr>
>         #formPasswordCell  ("Password" "password" "")
>       </tr>
>       <tr>
>         #formCell ("Name" "name" "")
>       </tr>
>       <tr>
>         #formCell ("Root" "father_id" "")
>       </tr>
>       <tr>
>         #formCell ("Group" "cat_id" "")
>       </tr>
>       <tr>
>         ##formCell ("Message" "body" "")
>         ##<td>Message</td><td><textarea rows="10" name="body" 
> cols="80"></textarea></td>
>         #formTextAreaCell("Message" "body" "" "10" "80")
>       </tr>
>       <tr>
>         #fileUpload ("File" "filename")
>       </tr>
>       <tr>
>         #fileUpload ("Image" "image")
>       </tr>
>     </table>
>     <input type="submit" name="eventSubmit_doInsert" value="Insert"/>
>   </div>
> </form>
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to