开发者

bad_utf8_character_code in CouchDB

I just imported a database to couchDB to try it out. Unfortunately it seems there is some bad characters are got into my documents, so I can not create any view. Considering the large amount of data, I cann't examine the document开发者_如何学运维s one by one. Can somebody tell me please how can I identify the bad documents?

thanks


I tried to convert it to UTF-8 with

byte[] utf8Bytes = json.getBytes("UTF8");
value = new String(utf8Bytes,"UTF-8");

But couchdb still complains.


OK. I solved the problem. It was not actually the source that had bad characters. It was the http PUT command. The only thing I added is the proper UTF-8 header. charset=UTF-8


Can you give us a bit more information?

Are you importing the data from a text file? Another db?

Be glad to help, just don't really know where to start. :-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜