Return-Path: X-Original-To: apmail-qpid-dev-archive@www.apache.org Delivered-To: apmail-qpid-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A979810D08 for ; Thu, 22 Aug 2013 14:37:12 +0000 (UTC) Received: (qmail 13634 invoked by uid 500); 22 Aug 2013 14:37:12 -0000 Delivered-To: apmail-qpid-dev-archive@qpid.apache.org Received: (qmail 13425 invoked by uid 500); 22 Aug 2013 14:37:12 -0000 Mailing-List: contact dev-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list dev@qpid.apache.org Received: (qmail 13410 invoked by uid 99); 22 Aug 2013 14:37:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Aug 2013 14:37:10 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of justin.ross@gmail.com designates 209.85.219.48 as permitted sender) Received: from [209.85.219.48] (HELO mail-oa0-f48.google.com) (209.85.219.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Aug 2013 14:37:05 +0000 Received: by mail-oa0-f48.google.com with SMTP id o17so3476149oag.7 for ; Thu, 22 Aug 2013 07:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=iljtyJuQ8GFP9x3zDhaY/f6Efw5w/AMta/RquHTlOo8=; b=Tqh77KXmj6FJKhiquwwpJzisj9tUmgoXAYdpZHeKYuehYP/j6WQDlkrSskGM6zhVdI 7Wj8zdexsw5Y81iiyC0lUkg8/dn83b4SZWHFISi3zFSiUpZsTfzL2JTtUz4P+2ZFSCz+ lRQraHOaTBNuGSq7FS0ClfIVSvDvIk6dGGK7hXPRl5Hvatp3S4xTvH0h2FCg1wI3NjWl oq8+x/M2AD0OXPw8veEXadAtMNGIjNBc71fShmhuCpxlRp5jvVcEBZFrdQgg3lqdmUeP lrlUBkggcvfqQufwmLVbI3FY0Xh1H7RynQkhuQinzjYv7oyQ0GRbWIhWYoc4fFydOiYN iZlw== MIME-Version: 1.0 X-Received: by 10.182.87.73 with SMTP id v9mr1627771obz.90.1377182204869; Thu, 22 Aug 2013 07:36:44 -0700 (PDT) Received: by 10.60.28.233 with HTTP; Thu, 22 Aug 2013 07:36:44 -0700 (PDT) In-Reply-To: <521606E8.2030508@redhat.com> References: <20130821200457.256250@gmx.com> <521606E8.2030508@redhat.com> Date: Thu, 22 Aug 2013 10:36:44 -0400 Message-ID: Subject: Re: UTF8 / binary strings in dynamic languages From: Justin Ross To: "dev@qpid.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Aug 22, 2013 at 8:41 AM, Gordon Sim wrote: > On 08/21/2013 10:43 PM, Justin Ross wrote: >> "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. 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. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org For additional commands, e-mail: dev-help@qpid.apache.org