repl: Handle wide characters properly

This fixes #555.

Handle wide characters (such as あ, 谢, 고) as two column wide to make cursor move properly.