From user-return-4419-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Tue Apr 14 18:12:33 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 99641 invoked from network); 14 Apr 2009 18:12:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Apr 2009 18:12:33 -0000 Received: (qmail 25634 invoked by uid 500); 14 Apr 2009 18:12:32 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 25534 invoked by uid 500); 14 Apr 2009 18:12:32 -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 25524 invoked by uid 99); 14 Apr 2009 18:12:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2009 18:12:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 74.125.92.26 as permitted sender) Received: from [74.125.92.26] (HELO qw-out-2122.google.com) (74.125.92.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2009 18:12:24 +0000 Received: by qw-out-2122.google.com with SMTP id 8so1864955qwh.29 for ; Tue, 14 Apr 2009 11:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=Cp1mJJB5B6dH0f62tlgPmS1c66k/pmhJQ2+qBti2/q8=; b=bka3A74bgADKR7Xiu2cE121vbGYxBurEAl5XqVMxz+v6ZBZKwFFvOvaqAbPocUITS7 y+Tf38LD6s70hlC4P4dZ7bxQgpDGGtig5lXNW+osGvQ0V3hw2EAivWivb63bkPi2I3JK YZectb6JS/5kh23g5qzg7kjkAFXUmkAqnNs/k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=ohFM+DvL9Jny06e0gZ6ve7SNA3JcAdZjwYcHkrLlVAsWekzAbN2wNF7f6fx9jTfhiz tIaXm3LuAg7GjgVvhRPuFABeEN6C8QkUe40N2ePdkNyZBsZ7C30b2JH5UvuCuvSQYlnO SIODtJY6tQrojgX/mb6/ZEPY8gOKsSnC9qiuY= MIME-Version: 1.0 Sender: jchris@gmail.com Received: by 10.220.86.134 with SMTP id s6mr8261353vcl.4.1239732723073; Tue, 14 Apr 2009 11:12:03 -0700 (PDT) In-Reply-To: References: Date: Tue, 14 Apr 2009 11:12:02 -0700 X-Google-Sender-Auth: eab1818b05503bad Message-ID: Subject: Re: bad_utf8_character_code From: Chris Anderson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Apr 14, 2009 at 10:39 AM, Chris Farmiloe wrote= : > > A strange character has gotten into several of my documents and is > preventing any of my views from working raising: > If it is possible to create a reproducible test case we can work to prevent bad characters from getting saved in the first place. > {error_info, > =A0 =A0 =A0 =A0 =A0 {exit, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 {ucs,{bad_utf8_character_code}}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 [{xmerl_ucs,from_utf8,1}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{mochijson2,json_encode_string,2}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{mochijson2,'-json_encode_proplist/2-fun-0= -',3}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{lists,foldl,3}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{mochijson2,json_encode_proplist,2}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{couch_httpd,send_json,4}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{couch_httpd,handle_request,4}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{mochiweb_http,headers,5}]}}, > > Would it not be better if couch simply left a warning in the log and > returned the documents without the characters that the ucs could not > understand? > Ideally we'd block the bad characters from ever being saved in the first pl= ace. --=20 Chris Anderson http://jchrisa.net http://couch.io