Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 82008 invoked from network); 5 Jun 2009 18:53:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Jun 2009 18:53:20 -0000 Received: (qmail 94012 invoked by uid 500); 5 Jun 2009 18:53:31 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 93971 invoked by uid 500); 5 Jun 2009 18:53:31 -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 93961 invoked by uid 99); 5 Jun 2009 18:53:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jun 2009 18:53:31 +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; Fri, 05 Jun 2009 18:53:28 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 79425234C052 for ; Fri, 5 Jun 2009 11:53:07 -0700 (PDT) Message-ID: <195378682.1244227987495.JavaMail.jira@brutus> Date: Fri, 5 Jun 2009 11:53:07 -0700 (PDT) From: "Damien Katz (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (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:comment-tabpanel&focusedCommentId=12716720#action_12716720 ] Damien Katz commented on COUCHDB-333: ------------------------------------- I think we should add this to our mochiweb src until it's patched upstream. I'd even like to see it in 0.9.1, since this problem can break replication. > 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.