Reputation: 12415
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 documents 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.
Upvotes: 1
Views: 627
Reputation: 12415
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
Upvotes: 2
Reputation: 1806
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. :-)
Upvotes: 1