support document written in UTF-8