Multibyte character sanitize

I would fixed for support ree 1.8.7.