qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Ross <justin.r...@gmail.com>
Subject Re: UTF8 / binary strings in dynamic languages
Date Thu, 22 Aug 2013 15:43:40 GMT
On Thu, Aug 22, 2013 at 10:54 AM, Gordon Sim <gsim@redhat.com> wrote:
>> Right.  I'm saying that sucks, so don't do that.  For instance, we
>> could ask our users to use a 'Data' class to input arbitrary bytes,
>> and otherwise treat ambiguous strings as textual.
> The point is that it is easy for people to miss that. Just as it is easy for
> them to miss the fact that you should choose the explicit utf8 type for
> textual data.
> An explicit type is always preferable. The question is how to handle an
> ambiguous type. If encoded as a str16 then it may work in some case and fail
> in others; i.e. a subtle bug that testing may not catch depending on
> payloads actually tested. By contrast if it is encoded as a vbin the
> behaviour - even though admittedly unexpected for many - will at least be
> the same each time you try it independent of the actual contents of the
> string.

Sorry, it took me too long to understand the scenario in question.
You and Jimmy are of course right about this very real gotcha.


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

View raw message