[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski updated HTTPCLIENT-1667:
------------------------------------------
         Priority: Major  (was: Critical)
    Fix Version/s: 5.0
                   4.5.1

> RequestBuilder ignores Charset 
> -------------------------------
>
>                 Key: HTTPCLIENT-1667
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1667
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.5
>            Reporter: Sergey Smith
>             Fix For: 4.5.1, 5.0
>
>
> Sorry for my English.
> Class *org.apache.http.client.methods.RequestBuilder* in method *build()* 
> FORCE to use ISO-8859-1 encoding
> For example my using:
> {code}
> HttpUriRequest post = RequestBuilder.post().setUri(url)
>       .setCharset(Charset.forName("Windows-1251"))
>       .addParameter("xml", xml).build();
> {code}
> QuickFix (line ~481):
> {code}
>             if (entityCopy == null && 
> (HttpPost.METHOD_NAME.equalsIgnoreCase(method)
>                     || HttpPut.METHOD_NAME.equalsIgnoreCase(method))) {
> --                entityCopy = new UrlEncodedFormEntity(parameters, 
> HTTP.DEF_CONTENT_CHARSET);
> ++                entityCopy = new UrlEncodedFormEntity(parameters, charset 
> != null ? charset : HTTP.DEF_CONTENT_CHARSET);
> {code}
> I think it also may to be changed in other places in class.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to