diff --git a/PowerEditor/installer/nativeLang/english.xml b/PowerEditor/installer/nativeLang/english.xml
index dd05fda11..5d470b1a1 100644
--- a/PowerEditor/installer/nativeLang/english.xml
+++ b/PowerEditor/installer/nativeLang/english.xml
@@ -283,14 +283,14 @@ The comments are here for explanation, it's not necessary to translate them.
-
-
+
+
-
-
+
+
@@ -864,8 +864,8 @@ You can define several column markers by using white space to separate the diffe
-
-
+
+
diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp
index 8abe71733..99e53da70 100644
--- a/PowerEditor/src/Notepad_plus.cpp
+++ b/PowerEditor/src/Notepad_plus.cpp
@@ -2580,13 +2580,13 @@ void Notepad_plus::setUniModeText()
case uniUTF8:
uniModeTextString = TEXT("UTF-8-BOM"); break;
case uni16BE:
- uniModeTextString = TEXT("UCS-2 BE BOM"); break;
+ uniModeTextString = TEXT("UTF-16 BE BOM"); break;
case uni16LE:
- uniModeTextString = TEXT("UCS-2 LE BOM"); break;
+ uniModeTextString = TEXT("UTF-16 LE BOM"); break;
case uni16BE_NoBOM:
- uniModeTextString = TEXT("UCS-2 Big Endian"); break;
+ uniModeTextString = TEXT("UTF-16 Big Endian"); break;
case uni16LE_NoBOM:
- uniModeTextString = TEXT("UCS-2 Little Endian"); break;
+ uniModeTextString = TEXT("UTF-16 Little Endian"); break;
case uniCookie:
uniModeTextString = TEXT("UTF-8"); break;
default :
@@ -4463,8 +4463,8 @@ void Notepad_plus::checkUnicodeMenuItems() const
switch (um)
{
case uniUTF8 : id = IDM_FORMAT_UTF_8; break;
- case uni16BE : id = IDM_FORMAT_UCS_2BE; break;
- case uni16LE : id = IDM_FORMAT_UCS_2LE; break;
+ case uni16BE : id = IDM_FORMAT_UTF_16BE; break;
+ case uni16LE : id = IDM_FORMAT_UTF_16LE; break;
case uniCookie : id = IDM_FORMAT_AS_UTF_8; break;
case uni8Bit : id = IDM_FORMAT_ANSI; break;
}
diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc
index 5915584ef..835b60936 100644
--- a/PowerEditor/src/Notepad_plus.rc
+++ b/PowerEditor/src/Notepad_plus.rc
@@ -581,8 +581,8 @@ BEGIN
MENUITEM "ANSI", IDM_FORMAT_ANSI
MENUITEM "UTF-8", IDM_FORMAT_AS_UTF_8
MENUITEM "UTF-8-BOM", IDM_FORMAT_UTF_8
- MENUITEM "UCS-2 BE BOM", IDM_FORMAT_UCS_2BE
- MENUITEM "UCS-2 LE BOM", IDM_FORMAT_UCS_2LE
+ MENUITEM "UTF-16 BE BOM", IDM_FORMAT_UTF_16BE
+ MENUITEM "UTF-16 LE BOM", IDM_FORMAT_UTF_16LE
POPUP "Character sets"
BEGIN
POPUP "Arabic"
@@ -698,8 +698,8 @@ BEGIN
MENUITEM "Convert to ANSI", IDM_FORMAT_CONV2_ANSI
MENUITEM "Convert to UTF-8", IDM_FORMAT_CONV2_AS_UTF_8
MENUITEM "Convert to UTF-8-BOM", IDM_FORMAT_CONV2_UTF_8
- MENUITEM "Convert to UCS-2 BE BOM", IDM_FORMAT_CONV2_UCS_2BE
- MENUITEM "Convert to UCS-2 LE BOM", IDM_FORMAT_CONV2_UCS_2LE
+ MENUITEM "Convert to UTF-16 BE BOM", IDM_FORMAT_CONV2_UTF_16BE
+ MENUITEM "Convert to UTF-16 LE BOM", IDM_FORMAT_CONV2_UTF_16LE
END
POPUP "&Language"
diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp
index ebcd48ed7..166ad8947 100644
--- a/PowerEditor/src/NppCommands.cpp
+++ b/PowerEditor/src/NppCommands.cpp
@@ -2366,8 +2366,8 @@ void Notepad_plus::command(int id)
case IDM_FORMAT_ANSI :
case IDM_FORMAT_UTF_8 :
- case IDM_FORMAT_UCS_2BE :
- case IDM_FORMAT_UCS_2LE :
+ case IDM_FORMAT_UTF_16BE :
+ case IDM_FORMAT_UTF_16LE :
case IDM_FORMAT_AS_UTF_8 :
{
Buffer * buf = _pEditView->getCurrentBuffer();
@@ -2385,11 +2385,11 @@ void Notepad_plus::command(int id)
um = uniUTF8;
break;
- case IDM_FORMAT_UCS_2BE:
+ case IDM_FORMAT_UTF_16BE:
um = uni16BE;
break;
- case IDM_FORMAT_UCS_2LE:
+ case IDM_FORMAT_UTF_16LE:
um = uni16LE;
break;
@@ -2555,8 +2555,8 @@ void Notepad_plus::command(int id)
case IDM_FORMAT_CONV2_ANSI:
case IDM_FORMAT_CONV2_AS_UTF_8:
case IDM_FORMAT_CONV2_UTF_8:
- case IDM_FORMAT_CONV2_UCS_2BE:
- case IDM_FORMAT_CONV2_UCS_2LE:
+ case IDM_FORMAT_CONV2_UTF_16BE:
+ case IDM_FORMAT_CONV2_UTF_16LE:
{
int idEncoding = -1;
Buffer *buf = _pEditView->getCurrentBuffer();
@@ -2628,7 +2628,7 @@ void Notepad_plus::command(int id)
break;
}
- case IDM_FORMAT_CONV2_UCS_2BE:
+ case IDM_FORMAT_CONV2_UTF_16BE:
{
if (encoding != -1)
{
@@ -2638,7 +2638,7 @@ void Notepad_plus::command(int id)
return;
}
- idEncoding = IDM_FORMAT_UCS_2BE;
+ idEncoding = IDM_FORMAT_UTF_16BE;
if (um == uni16BE)
return;
@@ -2651,7 +2651,7 @@ void Notepad_plus::command(int id)
break;
}
- case IDM_FORMAT_CONV2_UCS_2LE:
+ case IDM_FORMAT_CONV2_UTF_16LE:
{
if (encoding != -1)
{
@@ -2661,7 +2661,7 @@ void Notepad_plus::command(int id)
return;
}
- idEncoding = IDM_FORMAT_UCS_2LE;
+ idEncoding = IDM_FORMAT_UTF_16LE;
if (um == uni16LE)
return;
if (um != uni8Bit)
diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp
index 380f83f98..9ba4f8268 100644
--- a/PowerEditor/src/Parameters.cpp
+++ b/PowerEditor/src/Parameters.cpp
@@ -313,8 +313,8 @@ static const WinMenuKeyDefinition winKeyDefs[] =
{ VK_NULL, IDM_FORMAT_ANSI, false, false, false, nullptr },
{ VK_NULL, IDM_FORMAT_AS_UTF_8, false, false, false, nullptr },
{ VK_NULL, IDM_FORMAT_UTF_8, false, false, false, nullptr },
- { VK_NULL, IDM_FORMAT_UCS_2BE, false, false, false, nullptr },
- { VK_NULL, IDM_FORMAT_UCS_2LE, false, false, false, nullptr },
+ { VK_NULL, IDM_FORMAT_UTF_16BE, false, false, false, nullptr },
+ { VK_NULL, IDM_FORMAT_UTF_16LE, false, false, false, nullptr },
{ VK_NULL, IDM_FORMAT_ISO_8859_6, false, false, false, nullptr },
{ VK_NULL, IDM_FORMAT_WIN_1256, false, false, false, nullptr },
@@ -367,8 +367,8 @@ static const WinMenuKeyDefinition winKeyDefs[] =
{ VK_NULL, IDM_FORMAT_CONV2_ANSI, false, false, false, nullptr },
{ VK_NULL, IDM_FORMAT_CONV2_AS_UTF_8, false, false, false, nullptr },
{ VK_NULL, IDM_FORMAT_CONV2_UTF_8, false, false, false, nullptr },
- { VK_NULL, IDM_FORMAT_CONV2_UCS_2BE, false, false, false, nullptr },
- { VK_NULL, IDM_FORMAT_CONV2_UCS_2LE, false, false, false, nullptr },
+ { VK_NULL, IDM_FORMAT_CONV2_UTF_16BE, false, false, false, nullptr },
+ { VK_NULL, IDM_FORMAT_CONV2_UTF_16LE, false, false, false, nullptr },
{ VK_NULL, IDM_LANG_USER_DLG, false, false, false, nullptr },
{ VK_NULL, IDM_LANG_USER, false, false, false, nullptr },
diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp
index 968c82a67..f899e9bf3 100644
--- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp
+++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp
@@ -19,7 +19,6 @@
#include "FindReplaceDlg.h"
#include "ScintillaEditView.h"
#include "Notepad_plus_msgs.h"
-#include "UniConversion.h"
#include "localization.h"
#include "Utf8.h"
diff --git a/PowerEditor/src/UniConversion.cpp b/PowerEditor/src/UniConversion.cpp
deleted file mode 100644
index 66b9f71b7..000000000
--- a/PowerEditor/src/UniConversion.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-// Scintilla source code edit control
-/** @file UniConversion.cxx
- ** Functions to handle UFT-8 and UCS-2 strings.
- **/
-// Copyright 1998-2001 by Neil Hodgson
-// The License.txt file describes the conditions under which this software may be distributed.
-
-#include
-#include "UniConversion.h"
-
-unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen)
-{
- unsigned int len = 0;
- for (unsigned int i = 0; i < tlen && uptr[i]; ++i)
- {
- unsigned int uch = uptr[i];
- if (uch < 0x80)
- ++len;
- else if (uch < 0x800)
- len += 2;
- else
- len +=3;
- }
- return len;
-}
-
-void UTF8FromUCS2(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len)
-{
- int k = 0;
- for (unsigned int i = 0; i < tlen && uptr[i]; ++i)
- {
- unsigned int uch = uptr[i];
- if (uch < 0x80)
- {
- putf[k++] = static_cast(uch);
- }
- else if (uch < 0x800)
- {
- putf[k++] = static_cast(0xC0 | (uch >> 6));
- putf[k++] = static_cast(0x80 | (uch & 0x3f));
- }
- else
- {
- putf[k++] = static_cast(0xE0 | (uch >> 12));
- putf[k++] = static_cast(0x80 | ((uch >> 6) & 0x3f));
- putf[k++] = static_cast(0x80 | (uch & 0x3f));
- }
- }
- putf[len] = '\0';
-}
-
-unsigned int UCS2Length(const char *s, unsigned int len)
-{
- unsigned int ulen = 0;
- for (unsigned int i=0; i(s[i]);
- if ((ch < 0x80) || (ch > (0x80 + 0x40)))
- ++ulen;
- }
- return ulen;
-}
-
-unsigned int UCS2FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen)
-{
- unsigned int ui=0;
- const UCHAR *us = reinterpret_cast(s);
- unsigned int i=0;
- while ((i((ch & 0x1F) << 6);
- ch = us[i++];
- tbuf[ui] = static_cast(tbuf[ui] + (ch & 0x7F));
- }
- else
- {
- tbuf[ui] = static_cast((ch & 0xF) << 12);
- ch = us[i++];
- tbuf[ui] = static_cast(tbuf[ui] + ((ch & 0x7F) << 6));
- ch = us[i++];
- tbuf[ui] = static_cast(tbuf[ui] + (ch & 0x7F));
- }
- ui++;
- }
- return ui;
-}
-
-
-unsigned int ascii_to_utf8(const char * pszASCII, unsigned int lenASCII, char * pszUTF8)
-{
- // length of pszUTF8 must be enough;
- // its maximum is (lenASCII*3 + 1)
-
- if (!lenASCII || !pszASCII)
- {
- pszUTF8[0] = 0;
- return 0;
- }
-
- unsigned int lenUCS2;
- unsigned int lenUTF8;
- wchar_t *pszUCS2 = new wchar_t[lenASCII * 3 + 1];
- if (!pszUCS2)
- {
- pszUTF8[0] = 0;
- return 0;
- }
-
- lenUCS2 = ::MultiByteToWideChar(CP_ACP, 0, pszASCII, lenASCII, pszUCS2, lenASCII + 1);
- lenUTF8 = UTF8Length(pszUCS2, lenUCS2);
- // length of pszUTF8 must be >= (lenUTF8 + 1)
- UTF8FromUCS2(pszUCS2, lenUCS2, pszUTF8, lenUTF8);
- delete [] pszUCS2;
- return lenUTF8;
-}
-
-int utf8_to_ascii(const char * pszUTF8, unsigned int lenUTF8, char * pszASCII)
-{
- // length of pszASCII must be enough;
- // its maximum is (lenUTF8 + 1)
-
- if (!lenUTF8 || !pszUTF8)
- {
- pszASCII[0] = 0;
- return 0;
- }
-
- unsigned int lenUCS2;
- wchar_t* pszUCS2;
-
- pszUCS2 = new wchar_t[lenUTF8 + 1];
- if (!pszUCS2)
- {
- pszASCII[0] = 0;
- return 0;
- }
-
- lenUCS2 = UCS2FromUTF8(pszUTF8, lenUTF8, pszUCS2, lenUTF8);
- pszUCS2[lenUCS2] = 0;
- // length of pszASCII must be >= (lenUCS2 + 1)
- int nbByte = ::WideCharToMultiByte(CP_ACP, 0, pszUCS2, lenUCS2, pszASCII, lenUCS2 + 1, NULL, NULL);
- delete [] pszUCS2;
- return nbByte;
-}
-
diff --git a/PowerEditor/src/UniConversion.h b/PowerEditor/src/UniConversion.h
deleted file mode 100644
index 86224fb6d..000000000
--- a/PowerEditor/src/UniConversion.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Scintilla source code edit control
-/** @file UniConversion.h
- ** Functions to handle UFT-8 and UCS-2 strings.
- **/
-// Copyright 1998-2001 by Neil Hodgson
-// The License.txt file describes the conditions under which this software may be distributed.
-
-#pragma once
-
-unsigned int UTF8Length(const wchar_t * uptr, unsigned int tlen);
-void UTF8FromUCS2(const wchar_t * uptr, unsigned int tlen, char * putf, unsigned int len);
-unsigned int UCS2Length(const char * s, unsigned int len);
-unsigned int UCS2FromUTF8(const char * s, unsigned int len, wchar_t * tbuf, unsigned int tlen);
-unsigned int ascii_to_utf8(const char * pszASCII, unsigned int lenASCII, char * pszUTF8);
-int utf8_to_ascii(const char * pszUTF8, unsigned int lenUTF8, char * pszASCII);
-
diff --git a/PowerEditor/src/WinControls/Preference/preference.rc b/PowerEditor/src/WinControls/Preference/preference.rc
index d5e99ee53..0d52aee0f 100644
--- a/PowerEditor/src/WinControls/Preference/preference.rc
+++ b/PowerEditor/src/WinControls/Preference/preference.rc
@@ -131,8 +131,8 @@ BEGIN
CONTROL "UTF-8",IDC_RADIO_UTF8SANSBOM,"Button",BS_AUTORADIOBUTTON,242,53,128,10
CONTROL "Apply to opened ANSI files",IDC_CHECK_OPENANSIASUTF8, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,252,65,144,10
CONTROL "UTF-8 with BOM",IDC_RADIO_UTF8,"Button",BS_AUTORADIOBUTTON,242,79,62,10
- CONTROL "UCS-2 Big Endian with BOM",IDC_RADIO_UCS2BIG,"Button",BS_AUTORADIOBUTTON,242,95,110,10
- CONTROL "UCS-2 Little Endian with BOM",IDC_RADIO_UCS2SMALL,"Button",BS_AUTORADIOBUTTON,242,111,110,10
+ CONTROL "UTF-16 Big Endian with BOM",IDC_RADIO_UTF16BIG,"Button",BS_AUTORADIOBUTTON,242,95,110,10
+ CONTROL "UTF-16 Little Endian with BOM",IDC_RADIO_UTF16SMALL,"Button",BS_AUTORADIOBUTTON,242,111,110,10
CONTROL "",IDC_RADIO_OTHERCP,"Button",BS_AUTORADIOBUTTON,242,126,10,10
COMBOBOX IDC_COMBO_OTHERCP,257,125,100,140,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Default language :",IDC_DEFAULTLANG_STATIC,16,130,77,8
diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp
index 06ce23450..070839ec2 100644
--- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp
+++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp
@@ -1207,10 +1207,10 @@ INT_PTR CALLBACK NewDocumentSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPA
switch (ndds._unicodeMode)
{
case uni16BE :
- ID2Check = IDC_RADIO_UCS2BIG;
+ ID2Check = IDC_RADIO_UTF16BIG;
break;
case uni16LE :
- ID2Check = IDC_RADIO_UCS2SMALL;
+ ID2Check = IDC_RADIO_UTF16SMALL;
break;
case uniUTF8 :
ID2Check = IDC_RADIO_UTF8;
@@ -1287,14 +1287,14 @@ INT_PTR CALLBACK NewDocumentSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPA
case WM_COMMAND:
switch (wParam)
{
- case IDC_RADIO_UCS2BIG:
+ case IDC_RADIO_UTF16BIG:
ndds._unicodeMode = uni16BE;
ndds._openAnsiAsUtf8 = false;
makeOpenAnsiAsUtf8(false);
ndds._codepage = -1;
::EnableWindow(::GetDlgItem(_hSelf, IDC_COMBO_OTHERCP), false);
return TRUE;
- case IDC_RADIO_UCS2SMALL:
+ case IDC_RADIO_UTF16SMALL:
ndds._unicodeMode = uni16LE;
ndds._openAnsiAsUtf8 = false;
makeOpenAnsiAsUtf8(false);
diff --git a/PowerEditor/src/WinControls/Preference/preference_rc.h b/PowerEditor/src/WinControls/Preference/preference_rc.h
index 154309e90..1e3350d11 100644
--- a/PowerEditor/src/WinControls/Preference/preference_rc.h
+++ b/PowerEditor/src/WinControls/Preference/preference_rc.h
@@ -217,8 +217,8 @@
#define IDC_RADIO_ANSI (IDD_PREFERENCE_SUB_NEWDOCUMENT + 6)
#define IDC_RADIO_UTF8SANSBOM (IDD_PREFERENCE_SUB_NEWDOCUMENT + 7)
#define IDC_RADIO_UTF8 (IDD_PREFERENCE_SUB_NEWDOCUMENT + 8)
- #define IDC_RADIO_UCS2BIG (IDD_PREFERENCE_SUB_NEWDOCUMENT + 9)
- #define IDC_RADIO_UCS2SMALL (IDD_PREFERENCE_SUB_NEWDOCUMENT + 10)
+ #define IDC_RADIO_UTF16BIG (IDD_PREFERENCE_SUB_NEWDOCUMENT + 9)
+ #define IDC_RADIO_UTF16SMALL (IDD_PREFERENCE_SUB_NEWDOCUMENT + 10)
#define IDC_DEFAULTLANG_STATIC (IDD_PREFERENCE_SUB_NEWDOCUMENT + 11)
#define IDC_COMBO_DEFAULTLANG (IDD_PREFERENCE_SUB_NEWDOCUMENT + 12)
#define IDC_OPENSAVEDIR_GR_STATIC (IDD_PREFERENCE_SUB_NEWDOCUMENT + 13)
diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h
index a20fd240e..e261f8b44 100644
--- a/PowerEditor/src/menuCmdID.h
+++ b/PowerEditor/src/menuCmdID.h
@@ -362,14 +362,14 @@
#define IDM_FORMAT_TOMAC (IDM_FORMAT + 3)
#define IDM_FORMAT_ANSI (IDM_FORMAT + 4)
#define IDM_FORMAT_UTF_8 (IDM_FORMAT + 5)
- #define IDM_FORMAT_UCS_2BE (IDM_FORMAT + 6)
- #define IDM_FORMAT_UCS_2LE (IDM_FORMAT + 7)
+ #define IDM_FORMAT_UTF_16BE (IDM_FORMAT + 6)
+ #define IDM_FORMAT_UTF_16LE (IDM_FORMAT + 7)
#define IDM_FORMAT_AS_UTF_8 (IDM_FORMAT + 8)
#define IDM_FORMAT_CONV2_ANSI (IDM_FORMAT + 9)
#define IDM_FORMAT_CONV2_AS_UTF_8 (IDM_FORMAT + 10)
#define IDM_FORMAT_CONV2_UTF_8 (IDM_FORMAT + 11)
- #define IDM_FORMAT_CONV2_UCS_2BE (IDM_FORMAT + 12)
- #define IDM_FORMAT_CONV2_UCS_2LE (IDM_FORMAT + 13)
+ #define IDM_FORMAT_CONV2_UTF_16BE (IDM_FORMAT + 12)
+ #define IDM_FORMAT_CONV2_UTF_16LE (IDM_FORMAT + 13)
#define IDM_FORMAT_ENCODE (IDM_FORMAT + 20)
#define IDM_FORMAT_WIN_1250 (IDM_FORMAT_ENCODE + 0)
diff --git a/PowerEditor/visual.net/notepadPlus.vcxproj b/PowerEditor/visual.net/notepadPlus.vcxproj
index 9f437b74c..03c5d5e32 100755
--- a/PowerEditor/visual.net/notepadPlus.vcxproj
+++ b/PowerEditor/visual.net/notepadPlus.vcxproj
@@ -380,7 +380,6 @@ copy ..\src\contextMenu.xml ..\bin64\contextMenu.xml
-
@@ -671,7 +670,6 @@ copy ..\src\contextMenu.xml ..\bin64\contextMenu.xml
-