[CHANGE_BEHAVIOUR] Change document default value from ANSI to UTF8 w/o BOM.

[WALK_AROUND] Enable Word-completion under CJK environment for unicode document.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@994 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2012-12-10 23:46:17 +00:00
parent 90cd3e065a
commit 7e5e59feb5
3 changed files with 10 additions and 2 deletions

View File

@ -503,7 +503,7 @@ struct NewDocDefaultSettings
bool _openAnsiAsUtf8;
LangType _lang;
int _codepage; // -1 when not using
NewDocDefaultSettings():_format(WIN_FORMAT), _encoding(uni8Bit), _openAnsiAsUtf8(false), _lang(L_TEXT), _codepage(-1){};
NewDocDefaultSettings():_format(WIN_FORMAT), _encoding(uniCookie), _openAnsiAsUtf8(true), _lang(L_TEXT), _codepage(-1){};
};
struct LangMenuItem {

View File

@ -190,8 +190,16 @@ void AutoCompletion::update(int character)
{
if (nppGUI._autocStatus == nppGUI.autoc_word)
{
// Walk around - to avoid the crash under Chinese Windows7 ANSI doc mode
if (!_pEditView->isCJK())
{
showWordComplete(false);
}
else
{
if ((_pEditView->getCurrentBuffer())->getUnicodeMode() != uni8Bit)
showWordComplete(false);
}
}
else if (nppGUI._autocStatus == nppGUI.autoc_func)
showAutoComplete();

View File

@ -37,7 +37,7 @@
1 -> L_PHP
... (see source file)
-->
<GUIConfig name="NewDocDefaultSettings" format="0" encoding="0" lang="0" />
<GUIConfig name="NewDocDefaultSettings" format="0" encoding="4" lang="0" codepage="-1" openAnsiAsUTF8="yes" />
<GUIConfig name="langsExcluded" gr0="0" gr1="0" gr2="0" gr3="0" gr4="0" gr5="0" gr6="0" gr7="0" langMenuCompact="yes"/>
<!--
printOption is print colour setting, the following values are possible :