Hi, Whenever I try to do requests to CouchDB with Unicode characters in the content I get a 500 and an Erlang error. My Erlang is very weak, so even after reading the source of the function I believe the error comes from (tokenize in couchdb/cjson.erl) the error still doesn't make enough sense to fix it somehow.
My session looks like this: my request: URI -> "http://localhost:5984/blog" CONTENT -> "{\"a\":\"ą\"}" CONTENT-TYPE -> "application/json;charset=utf-8" CouchDB's answer: HEADERS -> ((:SERVER . "MochiWeb/1.0 (Any of you quaids got a smint?)") (:DATE . "Mon, 02 Jun 2008 21:17:18 GMT") (:CONTENT-TYPE . "text/plain;charset=utf-8") (:CONTENT-LENGTH . "379")) REASON -> "Internal Server Error" STATUS-CODE -> 500 BODY -> "{\"error\":\"EXIT\",\"reason\":\"{function_clause,[{cjson,tokenize,[[],{decoder,unicode,null,1,9,comma}]},\\n {cjson,decode_object,3},\\n {cjson,json_decode,2},\\n {couch_httpd,handle_db_request,3},\\n {couch_httpd,handle_request,2},\\n {mochiweb_http,headers,4},\\n {proc_lib,init_p,5}]}\"}" It looks as if CouchDB was seeing something strange in place of the good old ą. At the same time, I have reasons to believe I've done everything I could to send UTF-8... Does anybody have any clue what kind of data can be causing this error? Thanks in advance for your help, -- Richard -- http://szopa.tasak.gda.pl/
