You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by 傅玉宝 <fu...@gmail.com> on 2010/01/14 14:32:22 UTC

Re: [jira] Created: (HTTPCLIENT-905) HttpMethodBase.getResponseCharSet() returns ISO-8859-1 when no charset is specified in the Content-Type header

If no charset is specified in the Content-Type  header, ISO-8859-1 is
returned by HttpMethodBase
this is beacuse the HttpClient return the default charset which is
ISO-8859-1


2010/1/14 Jens Askengren (JIRA) <ji...@apache.org>

> HttpMethodBase.getResponseCharSet() returns ISO-8859-1 when no charset is
> specified in the Content-Type header
>
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-905
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-905
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 3.1 Final
>            Reporter: Jens Askengren
>
>
>
> If no charset is specified in the Content-Type  header, ISO-8859-1 is
> returned by HttpMethodBase.getResponseCharSet().
> In this case I would expect NULL to be returned so my application can fall
> back on content sniffing when the return value is not trustworthy.
>
> The HttpMethodBase.getResponseCharSet() and
> HttpMethodBase.getContentCharSet() methods seems to both return the charset
> specified in Content-Type header. What's the difference? The documentation
> is not clear.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>


-- 
fu