added support for multibyte string