On Fri, 2006-03-10 at 16:07 +0800, 韩侨 wrote:
> When I post the english content very smoothly, I faced problem when posting 
> content including chinese word. 
> 
> NameValuePair[] data = { 
> 
> new NameValuePair("subject",  "yao on fire呵呵"),
> 
> new NameValuePair("forumID", "39"), 
> 
> };
> 
>  
> 
> The post action is successful, but “yao on fire呵呵” becomes “yao on fire ??”
> 
> I tried several way: 
> 
> 1. use: 
> 
> new NameValuePair("subject", new String(("yao on fire 哈哈").getBytes("GBK"), 
> "iso-8859-1")),
> 
> does not hold .
> 
>  
> 
> 2. according to the doc
> 
> I insert the line as follows:
> 
> postMethod.addRequestHeader("Content-type","text/xml; charset=ISO-8859-1");
> 

Try this:

postMethod.addRequestHeader(
 "Content-type",
 "application/x-www-form-urlencoded; charset=GBK");

Hope this helps

Oleg

>  
> 
> but request becomes puzzled, even resulting in failing of post action.
> 
>  
> 
> Help !!
> 
>  
> 


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

Reply via email to