Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 39285 invoked from network); 9 Feb 2010 01:14:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Feb 2010 01:14:02 -0000 Received: (qmail 60516 invoked by uid 500); 9 Feb 2010 01:14:02 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 60459 invoked by uid 500); 9 Feb 2010 01:14:02 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 60449 invoked by uid 99); 9 Feb 2010 01:14:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2010 01:14:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2010 01:13:52 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BE7D5234C1EE for ; Mon, 8 Feb 2010 17:13:32 -0800 (PST) Message-ID: <1769759010.13891265678012778.JavaMail.jira@brutus.apache.org> Date: Tue, 9 Feb 2010 01:13:32 +0000 (UTC) From: "Jim Gomes (JIRA)" To: dev@activemq.apache.org Subject: [jira] Resolved: (AMQNET-230) Xml Message Encoding should not add Byte Order Mark (BOM) into TextMessage field In-Reply-To: <1572131733.13871265677772994.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/AMQNET-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jim Gomes resolved AMQNET-230. ------------------------------ Resolution: Fixed Refactored the Xml serializers to not add a BOM to the TextMessage body. > Xml Message Encoding should not add Byte Order Mark (BOM) into TextMessage field > -------------------------------------------------------------------------------- > > Key: AMQNET-230 > URL: https://issues.apache.org/activemq/browse/AMQNET-230 > Project: ActiveMQ .Net > Issue Type: Bug > Components: NMS > Affects Versions: 1.2.0 > Reporter: Jim Gomes > Assignee: Jim Gomes > Fix For: 1.3.0 > > > The XmlSerializer in XmlUtl is adding a Byte Order Mark (BOM) as it is marshaling XML messages. The BOM is being added because it is using a MemoryStream as the underlying buffer mechanism. Technically, adding a BOM mark to a typed field is incorrect. The message body of a TextMessage is typed as a Unicode string, therefore no BOM should be added. Adding a BOM breaks inter-platform compatibility with other clients. The following is taken from the Unicode FAQ (http://unicode.org/faq/utf_bom.html): > {quote} > Q: Why wouldn't I always use a protocol that requires a BOM? > A: Where the data is typed, such as a field in a database, a BOM is unnecessary. In particular, if a text data stream is marked as UTF-16BE, UTF-16LE, UTF-32BE or UTF-32LE, a BOM is neither necessary nor permitted. Any FEFF would be interpreted as a ZWNBSP. > Do not tag every string in a database or set of fields with a BOM, since it wastes space and complicates string concatenation. Moreover, it also means two data fields may have precisely the same content, but not be binary-equal (where one is prefaced by a BOM). > {quote} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.