You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by sebb <se...@gmail.com> on 2010/12/16 03:04:42 UTC

Strange default for StringBody default charset

The default charset for StringBody is currently set to Charset.defaultCharset().
This seems odd, as it varies between hosts.

The equivalent class in HC 3.1 appears to be StringPart, which uses
the default of "US-ASCII" for the charset name.
That seems to be a more sensible default.

It's probably too late to change the default for 4.x, but should it be
changed for 5.x?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: Strange default for StringBody default charset

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2010-12-16 at 20:21 +0000, sebb wrote:
> In 16 December 2010 20:11, Oleg Kalnichevski <ol...@apache.org> wrote:
> > On Thu, 2010-12-16 at 02:04 +0000, sebb wrote:
> >> The default charset for StringBody is currently set to Charset.defaultCharset().
> >> This seems odd, as it varies between hosts.
> >>
> >> The equivalent class in HC 3.1 appears to be StringPart, which uses
> >> the default of "US-ASCII" for the charset name.
> >> That seems to be a more sensible default.
> >>
> >> It's probably too late to change the default for 4.x, but should it be
> >> changed for 5.x?
> >>
> >
> > We do not know how long it may take until 5.0. Just go ahead and change
> > it.
> 
> Changing the default may change the behaviour of existing code.
> So I guess the current behaviour should be regarded as a bug which needs fixing.
> 
> OK?
> 
> If so, I'll create and resolve a JIRA and update the release notes.
> 

Works for me. 

HttpMime is still API unstable (due to the fact it used to depend on API
unstable mime4j. We can still change things.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: Strange default for StringBody default charset

Posted by sebb <se...@gmail.com>.
In 16 December 2010 20:11, Oleg Kalnichevski <ol...@apache.org> wrote:
> On Thu, 2010-12-16 at 02:04 +0000, sebb wrote:
>> The default charset for StringBody is currently set to Charset.defaultCharset().
>> This seems odd, as it varies between hosts.
>>
>> The equivalent class in HC 3.1 appears to be StringPart, which uses
>> the default of "US-ASCII" for the charset name.
>> That seems to be a more sensible default.
>>
>> It's probably too late to change the default for 4.x, but should it be
>> changed for 5.x?
>>
>
> We do not know how long it may take until 5.0. Just go ahead and change
> it.

Changing the default may change the behaviour of existing code.
So I guess the current behaviour should be regarded as a bug which needs fixing.

OK?

If so, I'll create and resolve a JIRA and update the release notes.

> Oleg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: Strange default for StringBody default charset

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2010-12-16 at 02:04 +0000, sebb wrote:
> The default charset for StringBody is currently set to Charset.defaultCharset().
> This seems odd, as it varies between hosts.
> 
> The equivalent class in HC 3.1 appears to be StringPart, which uses
> the default of "US-ASCII" for the charset name.
> That seems to be a more sensible default.
> 
> It's probably too late to change the default for 4.x, but should it be
> changed for 5.x?
> 

We do not know how long it may take until 5.0. Just go ahead and change
it.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org