Hi,

According to Java API doc,  getBytes() is "Encodes this String into a sequence of bytes
using the platform's default charset, storing the result into a new byte array.".
So, the platform's default charset is used... Therefore, some regression may occur in
non-English environment. I have submitted this patch in JS1-387. Please see my patch.

Regards,
 shinsuke


Scott T Weaver wrote:
> Hi Valdimir,
> 
> Send your fix in a patch format and someone will apply it.
> 
> 
> On Fri, 2004-06-25 at 07:37, Vladimir Figurov wrote:
> 
>>Hello, devs...
>>I'm post message in jetspeed-user - list, but not answers 8(((
>>
>>*ParameterParser have a broken national char after receive from form 
>>with multipart/form-data 
>><http://www.mail-archive.com/jetspeed-user%40jakarta.apache.org/msg12954.html>
>>http://www.mail-archive.com/jetspeed-user%40jakarta.apache.org/msg12954.html
>>
>>*There can be you will answer?
>>
>>ADDITION INFO:
>>
>>after including into <form ...> additional attribute:  
>>accept-charset="ISO-8859-1"
>>national characters receive is correct! But only from Mozilla-client or 
>>Opera-client.
>> From MS IE 6 (I dont have IE 5.5) - without changes 8(((( - I receive 
>>broken chars....
>>
>>I find method DefaultJetspeedParameterParser.getString(String name), 
>>which breaks the coding:
>>ORIGINAL:  
>>public String getString(String name)
>>    {
>>        String str = super.getString(name);
>>        if (str == null) return null;
>>
>>        try
>>        {
>>            return new String(str.getBytes("8859_1"), 
>>getCharacterEncoding());
>>        }
>>        catch (Exception e)
>>        {
>>            logger.warn("DefaultJetspeedParameterParser: Exception: " + 
>>e.toString());
>>            return str;
>>        }
>>
>>    }
>>
>>MY MODIFICATION:
>>        try
>>        {
>>            //from Opera - exception, but on in&out - characters correct
>>            //from Mozilla - in - correct, out - correct
>>            //from IE 6 - in INCORRECT, out - correct
>>            return new String(str.getBytes(), getCharacterEncoding());
>>        }

__________________________________________________
Do You Yahoo!?
http://bb.yahoo.co.jp/


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

Reply via email to