FIX:  doesn't reset encoding to Latin-1
FEAT: added a buffer to avoid flickering in INPUT.

FEAT: code refactoring for input.red
FIX: now search combining-table correctly.