qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: UTF8 / binary strings in dynamic languages
Date Thu, 22 Aug 2013 12:41:12 GMT
On 08/21/2013 10:43 PM, Justin Ross wrote:
> On Wed, Aug 21, 2013 at 4:04 PM, Jimmy Jones <jimmyjones2@gmx.co.uk> wrote:
>> I'm not convinced, but I'm prepared to be convinced. If I put a binary
>> value in a map and encoded it some of the time it might be valid utf8,
>> other times not. Could this lead to a class of subtle bugs where a receiver
>> written in a statically typed language will work most of the time when
>> the value appears as a vbin, but not other times when it "accidentally"
>> appears a a str16?
>
> "If I put a binary value in a map and encoded it some of the time it
> might be valid utf8, other times not."  This shouldn't be allowed to
> happen, IMO.  You meant it to be a binary value--we have to find a way
> to capture and preserve that information.

I believe the point was that for an application sending binary data via 
the ambiguous string type (between two processes in languages that have 
such a type), if that was encoded on the wire as str16 (i.e. utf8) it 
could lead to subtle bugs.

Testing could work until the actual binary payload was changed in some 
way such that it was not valid utf8.

By contrast, though more likely to be an issue, sending textual data via 
an ambiguous string in one language to another language that does not 
have the ambiguity will always produce the same (if slightly unexpected 
and mystifying) symptoms.

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


Mime
View raw message