Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 110E9CC93 for ; Fri, 27 Apr 2012 06:34:05 +0000 (UTC) Received: (qmail 87493 invoked by uid 500); 27 Apr 2012 06:34:03 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 87327 invoked by uid 500); 27 Apr 2012 06:33:59 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 87297 invoked by uid 99); 27 Apr 2012 06:33:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Apr 2012 06:33:57 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pjcarvalho@gmail.com designates 209.85.213.180 as permitted sender) Received: from [209.85.213.180] (HELO mail-yx0-f180.google.com) (209.85.213.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Apr 2012 06:33:53 +0000 Received: by yenl4 with SMTP id l4so232759yen.11 for ; Thu, 26 Apr 2012 23:33:32 -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=i+z7kDigJhLdOD2k2YpxYajYN9YfVHMheGPxxLa2hSI=; b=YbfsV82p2PXSKbae2FbQJiBEuQJazOWCHzKm+pvdTVEcFJYKR3Moh7gfLVf+KGKAnz VW0wTQlG4aAITQfiltmR+tHs7b0Fb7gLCt+84XX6YOqWhdngMSAhsXPZ8fD869RaRJRX Q15sfBR+qiuisxKwXVZ4Z0D7ZX3+0kLWloC5BNjV55SOXWJJIp3KlpxV25rd1tZ6+sp7 O+TrSlRUTBtEgIPleAdfjkpuYg9xtENziHoN0coqpRUtVrIOv+45ARqghNNyB8RyByFB aPAC7B2Jb6GrEcHe5otSyAtYjkM9ZuZ+OcvnqrhD0nYAEETe8MMiDVgdtNAJFaFLeBCI yLtQ== MIME-Version: 1.0 Received: by 10.236.154.2 with SMTP id g2mr9666250yhk.103.1335508412742; Thu, 26 Apr 2012 23:33:32 -0700 (PDT) Received: by 10.100.13.15 with HTTP; Thu, 26 Apr 2012 23:33:32 -0700 (PDT) In-Reply-To: References: Date: Fri, 27 Apr 2012 08:33:32 +0200 Message-ID: Subject: Re: Couchdb encoding configuration From: Paulo Carvalho To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=20cf302d49c8893db104bea34824 X-Virus-Checked: Checked by ClamAV on apache.org --20cf302d49c8893db104bea34824 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello Thanks for the answers. As suggested, I executed the following command: curl -X PUT -T xpto2.json http://127.0.0.1:5984/mybd/doc_id But the result was the same: {"error":"bad_request","reason":"invalid_json"} And in couchDB log: <<"{\"docs\":[{\"comm\":\"Taille =E9oyenne pour les structures -- =C9chantillons : 116-121\"}]}">>} If you have another suggestion, it is very welcome. Thank you Regards On Thu, Apr 26, 2012 at 8:40 PM, Dave Cottlehuber wrote: > > On Thu, Apr 26, 2012 at 4:37 PM, Paulo Carvalho >wrote: > > > >> Hello, > >> > >> I have a json file, which I think is valid, with the following content= : > >> > >> {"docs":[{"comm":"Taille =E9oyenne pour les structures -- =C9chantillo= ns : > >> 116-121"}]} > > Prior to transferring to couch, can one validate this? > > - as utf-8 > - as json > > Given a file utf8wtf.json, how about: > > iconv -f UTF-8 utf8wtf.json > > or with perl installed I can use this and check json as well: > > json_xs -t null -v < utf8wtf.json > > Any other ideas that might be more cross platform? > > A+ > Dave > --=20 Paulo Carvalho 1 rue du Chateau 57710 Aumetz France http://forum-informatico.forumeiros.com/index.htm http://ummundoecologico.blogspot.com --20cf302d49c8893db104bea34824--