switch the buffer to multibyte if the charset is utf-8
Merge pull request #2 from steckerhalter/master

switch the buffer to multibyte if the charset is utf-8