fix insert mode erase utf-8 handling, add unit test