fix encoding for page_doc