couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ho-Sheng Hsiao <>
Subject Re: UTF-8 Support?
Date Sat, 25 Oct 2008 17:45:41 GMT

Chris Anderson wrote:
> If you don't mind, I'll take a look at it. The error you showed sure
> looks like a utf8 error, but with such a big bulk upload it's hard to
> be sure.
> Perhaps you can put the Unihan-5.1.0.json file online somewhere, or if
> you have it boiled down to records that are causing the problem,
> singling those out would of course be helpful.

In the meantime, I may have found what was causing the utf8 error, and
have found a different error being thrown.

I  modified the extraction script so that it will do a bulk upload with
a single record. There were 9 errors of this type. When I took a look at
the three of the records, it seem pretty obvious:

    "kDefinition":"(Cant.) \u9152\ud841\udd44, a dimple",

    "kDefinition":"(Cant.) \u751f\ud843\ude12\u4eba, a stranger",

    "kDefinition":"(same as U+22E23 \ud84b\ude23) to select, pick",

What it looks like is that it is barfing on

The other error I was getting were weirder. I tried matching the error
output with the record by verifying that it made it into the database,
but there may be other records that did not report an error, yet CouchDB
returned a 404 when I tried querying it. What I'll do is write a check
script and have it run through all the records validating that the data
matches the source.

Here's a few of the other errors I was getting:


{cjson,tokenize,2},\n                  {cjson,decode1,2},\n
{cjson,decode_array,3},\n                  {cjson,decode_object,3},\n

               115,40]]},\n                  {cjson,tokenize,2},\n
{cjson,decode_object,3},\n                  {cjson,decode_array,3},\n


Records U+36B5 - U+36B8 were not loaded in. Weirdly enough, I think it
is barfing on these two records:

    "kDefinition":"(same as \u59d2)wife of one's husband's elder
brother; (in ancient China) the elder of twins; a Chinese family name,
(same as \u59ec) a handsome girl; a charming girl; a concubine; a
Chinese family name",

    "kDefinition":"(same as \u5b2d) the breasts of a woman; milk; a term
of respect for women; grandma, one's elder sister or sisters, used for a
girl's name","kCihaiT":"383.207","kMandarin":"ER3 NAI3",

Where you have \u59d2) and \u5b2d) ... but why would that effect the
other two records?

As I said, I'll write a checking script and validate all the info is
there. Since it will run or a while, I'll give it a shot after the first
utf8 error gets fixed -- who knows? the first error type might have
something to do with the second error type.

Thanks for your help.

Ho-Sheng Hsiao, VP of Engineering
Isshen Solutions, Inc.
(334) 559-9153

View raw message