use byte string for all when default encoding is not UTF-8 (fix #147 and close #222)