CtrlLib, ide: Support for UTF8-BOM encoding (RM #129)

git-svn-id: svn://ultimatepp.org/upp/trunk@4169 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-11-13 16:41:15 +00:00
parent 4d1b3f55cc
commit 5ee075c8ba
10 changed files with 451 additions and 422 deletions

View file

@ -438,7 +438,7 @@ bool DocEdit::Key(dword key, int cnt)
if(key >= ' ' && key < 65536 || key == '\n' || key == '\t' || key == K_SHIFT_SPACE) {
if(key == K_TAB && !processtab)
return false;
if(key >= 128 && key < 65536 && charset != CHARSET_UNICODE
if(key >= 128 && key < 65536 && (charset != CHARSET_UNICODE && charset != CHARSET_UTF8_BOM)
&& FromUnicode((wchar)key, charset) == DEFAULTCHAR)
return true;
RemoveSelection();