Take the 2-minute tour ×

I am trying to use GridFS to load a file along with some meta data using the java-driver. (2.5.3) Things work fine as long as the meta-data is in ASCII. But I get an exception - the moment I try and set a UTF8 string with non ascii characters. String MetaData = "学海"; GridFS gridFS = new GridFS(db); GridFSInputFile inputFile = myFS.createFile(new File(filePath)); DBObject dbObj = inputFile.getMetaData() dbObj.put("metaData", MetaData); ----> Get exception here (if non- ascii data)

share|improve this question
add comment

1 Answer

Are you able to use UTF8 strings when storing regular documents?

Based on your description, it sounds like you're trying to report a bug rather than ask a question.

MongoDB uses a JIRA system for reporting bugs. If you can include the code you are using this will help the driver developer correct the issue.

share|improve this answer
add comment

Your Answer


