From dev-return-4555-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Mon Jun 08 14:34:22 2009 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 31218 invoked from network); 8 Jun 2009 14:34:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Jun 2009 14:34:22 -0000 Received: (qmail 58621 invoked by uid 500); 8 Jun 2009 14:34:32 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 58533 invoked by uid 500); 8 Jun 2009 14:34:32 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 58317 invoked by uid 99); 8 Jun 2009 14:34:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jun 2009 14:34:32 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT 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; Mon, 08 Jun 2009 14:34:29 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E1F83234C1E6 for ; Mon, 8 Jun 2009 07:34:07 -0700 (PDT) Message-ID: <643833517.1244471647924.JavaMail.jira@brutus> Date: Mon, 8 Jun 2009 07:34:07 -0700 (PDT) From: "Adam Kocoloski (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Resolved: (COUCHDB-333) Json handling of UTF8 strings not in accordance with rfc4627 In-Reply-To: <31311803.1240678830310.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adam Kocoloski resolved COUCHDB-333. ------------------------------------ Resolution: Fixed patch applied to trunk (r 782643) and 0.9.x (r 782645) > Json handling of UTF8 strings not in accordance with rfc4627 > ------------------------------------------------------------ > > Key: COUCHDB-333 > URL: https://issues.apache.org/jira/browse/COUCHDB-333 > Project: CouchDB > Issue Type: Bug > Components: Database Core > Affects Versions: 0.9 > Environment: couchdb 0.9.0 spidermonkey 0.7.0 erlang R12B3 > Reporter: mark > Attachments: utf16-surrogate-pairs.diff > > > Handling of some unicode values escaped in json format \uXXXX fails with "invalid_json" error. > curl -X PUT -d '{"revisions":[],"_id":"U_1d11e","codepoint":"3441","definition":"\uD834\uDD1E G clef character"}' http://localhost:5984/mydb/U_1d11e > yields > {"error":"invalid_json","reason":"{\"revisions\":[],\"_id\":\"U_1d11e\",\"codepoint\":\"3441\",\"definition\":\"\\uD834\\uDD1E G clef character\"}"} > When the RFC states: > To escape an extended character that is not in the Basic Multilingual > Plane, the character is represented as a twelve-character sequence, > encoding the UTF-16 surrogate pair. So, for example, a string > containing only the G clef character (U+1D11E) may be represented as > "\uD834\uDD1E". > Furthermore, couchdb accepts encoded strings of the format \uXXXXXXXX which is not mentioned as acceptable in the json rfc > curl -X PUT -d '{"revisions":[],"_id":"U_1d11e","codepoint":"3441","definition":"\u0001D11E G clef character"}' http://localhost:5984/mydb/U_1d11e > Yields: > {"ok":true,"id":"U_1d11e","rev":"1-1270273433"} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.