[Bug 18191] Notepad should detect text type and adjust encoding automatically