Correct encoding and handle doctype

UTF-8 is used as default post content and doctype/html/body is not saved when saving back post content (this only work since php 5.4).