mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 13:54:54 +02:00
[NEW_FEATURE] Add the ability to force opened ANSI document as UTF-8 w/o BOM.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@392 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
967ddc39e0
commit
fbf0ab11fe
@ -411,7 +411,18 @@ BufferID FileManager::loadFile(const TCHAR * filename, Document doc) {
|
||||
{
|
||||
buf->determinateFormat("");
|
||||
}
|
||||
buf->setUnicodeMode(UnicodeConvertor.getEncoding());
|
||||
|
||||
UniMode encoding = UnicodeConvertor.getEncoding();
|
||||
if (encoding == uni8Bit)
|
||||
{
|
||||
NppParameters *pNppParamInst = NppParameters::getInstance();
|
||||
const NewDocDefaultSettings & ndds = (pNppParamInst->getNppGUI()).getNewDocDefaultSettings();
|
||||
if (ndds._encoding == uniCookie)
|
||||
{
|
||||
encoding = uniCookie;
|
||||
}
|
||||
}
|
||||
buf->setUnicodeMode(encoding);
|
||||
|
||||
//determine buffer properties
|
||||
BufferID retval = _nextBufferID++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user