fix bug: save document without use encoding