fix the extra chars under linux term, detect linux to set the locale. add func termis