added tests for documents without encoding