Gave up to use Readline because it has some problems with multibyte chars