diff --git a/Build/Changes.txt b/Build/Changes.txt index 63571417e..2201db1d8 100644 --- a/Build/Changes.txt +++ b/Build/Changes.txt @@ -1,13 +1,13 @@ -================================================================================== +================================================================================ = = = Notepad3 - light-weight Scintilla-based text editor for Windows = = = = (c) Rizonesoft 2008-2019 = = https://www.rizonesoft.com = = = -================================================================================== +================================================================================ Rizonesoft Notepad3 --- CHANGELOG --- -================================================================================== +================================================================================ ---------------------------------------------------- LEGEND: @@ -31,7 +31,7 @@ UCD - (UCD)ARDET is an Encoding Detector Library ==================================================== -Current BETA Version 5.19.1127.(#build) (2019-11-27) +Current BETA Version 5.19.1128.(#build) (2019-11-28) ==================================================== ---------------------------------------------------- @@ -49,6 +49,8 @@ NEW: ---------------------------------------------------- CHANGES: ---------------------------------------------------- +- Encoding detection fallback: explicitly defined or (UTF-8 (if valid) else current ANSI code-page). +- Use Ctrl+Alt+L for toggle "Menu: Reuse Window" option. - Change wording "Administrator" to "Elevated". - MiniPath - Notepad3 communication. - Hidden "ExitOnESCSkipLevel" feature (Exit on ESC can ignore a selection). diff --git a/test/test_files/encoding/Txtfiles/test_chinese_chars - UCD=GB18030 (issue #1815).txt b/test/test_files/encoding/Txtfiles/test_chinese_chars - UCD=GB18030 (issue #1815).txt new file mode 100644 index 000000000..54ed09b4f --- /dev/null +++ b/test/test_files/encoding/Txtfiles/test_chinese_chars - UCD=GB18030 (issue #1815).txt @@ -0,0 +1,5 @@ +这是乱码吗?现在测试一下是否会出现乱码。 + +今天是2019年11月28日 +天气:晴朗 气温:12摄氏度 +现在进行的是代码编码是否会错误 \ No newline at end of file diff --git a/test/test_files/encoding/UTF-8/dl - (utf-8) Use as fallback on detection failure (issue #1815).js b/test/test_files/encoding/UTF-8/dl - (utf-8) Use as fallback on detection failure (issue #1815).js new file mode 100644 index 000000000..971c0e14c --- /dev/null +++ b/test/test_files/encoding/UTF-8/dl - (utf-8) Use as fallback on detection failure (issue #1815).js @@ -0,0 +1,92 @@ +javascript:!function(){ + var userName = location.href.split("/")[4]; + var fileName = "Twilog-" + userName + ".html"; + var fileNameForAll = "Twi " + userName + ".html"; + + $(document).ready(function(){ + $("#loading").before('馃搩All(First)銉嶃偣銉'); + $('#save').css("size", "50px").click(function() { idSave(fileName) }); + $('#saveall').css("size", "50px").click(function() { idSaveAll(fileNameForAll, userName) }); + }); + + function idSaveAll(fName, id) { + var text = conv( $("#results").html(), true ); + if (text =="") return; + + var nest = "", LocalSaveFolder = "save", SaveFolderName = LocalSaveFolder; + if ($('#nest').is(':checked')) + var nest = "../../../", SaveFolderName = "FX" + "/" + LocalSaveFolder; + var header = ['', '', '', 'old tweets:', + '', + '', + '', + '', + '', + '', + '
'].join("\r\n"); + var footer = '
'; + // alert(fName + "\n" + text.slice(0,200)) + + saveFile(fName, [header, text, footer].join("\r\n")); + } + function idSave(fName) { + var text = conv( $("#results").html() ); + if (text =="") return; + saveFile(fName, text); + } + function saveFile(fName, text) { + var blob = new Blob([text], {type: "text/plain;charset=UTF-8"}); + if (window.navigator.msSaveBlob) + window.navigator.msSaveBlob(blob, fName); // IE + else { // 銇濄倢浠ュ + var a = document.createElement("a"); + a.href = URL.createObjectURL(blob); + a.download = fName; + a.click(); + } + } + + function conv(s, isAll) { + if (isAll != false && $("#newest").val() != "") { + var targetId = $("#newest").val().split(":")[0]; + if (location.href.indexOf(targetId) == -1) { + alert("銉︺兗銈躲兗鍚嶃亴涓鑷淬仐銇俱仜銈撱"); + $('input[name="new_user_box"]').val(targetId); + return ""; + } + var newest = $("#newest").val().split(":")[1]; + + var t = s.split(newest); + if (t[1] == undefined) { + alert("status id 銇岃銇ゃ亱銈娿伨銇涖倱銆侺oad 鏁般亴澧椼亪銈嬨伄銈掑緟銇c仸銇裤仸銇忋仩銇曘亜銆"); + return ""; + } + var ind = t[0].lastIndexOf(''); + s = t[0].substring(0, ind) + ''; + } else { + if (isAll == false) { + alert("status id 銈掑叆鍔涖仐銇︺亸銇犮仌銇勩"); + return ""; + } + } + + + s = s.split("/span>
", ume = sp1+kugiri, kara = ""; + var b = s.split("
", "
"); + s = a.join(kara); + if (10 > s.length) { alert("鏇存柊銇屻仾銇勩倛銇嗐仹銇欍"); return ""; } + return s; + } + +}();void 0; \ No newline at end of file