Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 9070 invoked from network); 5 May 2009 04:10:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 May 2009 04:10:54 -0000 Received: (qmail 35963 invoked by uid 500); 5 May 2009 04:10:53 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 35867 invoked by uid 500); 5 May 2009 04:10:53 -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 35857 invoked by uid 99); 5 May 2009 04:10:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2009 04:10:53 +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; Tue, 05 May 2009 04:10:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 53B14234C003 for ; Mon, 4 May 2009 21:10:30 -0700 (PDT) Message-ID: <1191845175.1241496630328.JavaMail.jira@brutus> Date: Mon, 4 May 2009 21:10:30 -0700 (PDT) From: "mark (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=12705889#action_12705889 ] mark commented on COUCHDB-333: ------------------------------ Issue has been reported upstream to mochiweb. http://code.google.com/p/mochiweb/issues/detail?id=35 > 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 > > 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.