diff --git a/exec/SlyEdit_Misc.js b/exec/SlyEdit_Misc.js index eb6ebd612aab42f129f1e240369e3aeaafe854e7..d9c015c7d3c90de863c185c60bc9fdaeb60219e6 100644 --- a/exec/SlyEdit_Misc.js +++ b/exec/SlyEdit_Misc.js @@ -1769,19 +1769,26 @@ function getCurrentTimeStr() return timeStr; } -// Returns whether or not a character is printable. +// Returns whether or not a character is printable. This function is fairly simplistic. function isPrintableChar(pText) { - // Make sure pText is valid and is a string. - if (typeof(pText) != "string") - return false; - if (pText.length == 0) - return false; + // Make sure pText is valid and is a string. + if (typeof(pText) != "string") + return false; + if (pText.length == 0) + return false; - // Make sure the character is a printable ASCII character in the range of 32 to 254, - // except for 127 (delete). - var charCode = pText.charCodeAt(0); - return ((charCode > 31) && (charCode < 255) && (charCode != 127)); + var charCode = pText.charCodeAt(0); + // If K_UTF8 exists, then we use it for input and UTF-8 characters are possible. + // Otherwise, just ASCII/CP437 characters are possible. + if (g_K_UTF8Exists) + return (charCode > 31 && charCode != 127); + else // ASCII/CP437 + { + // Make sure the character is a printable ASCII/CP437 character in the range of + // 32 to 254, except for 127 (delete). + return (charCode > 31 && charCode < 255 && charCode != 127); + } } // Removes multiple, leading, and/or trailing spaces diff --git a/exec/slyedcfg.js b/exec/slyedcfg.js index 76ab5021c95e462a40d5408666bf80b51dc59a78..ff4025d6b9d1e144c3516554c048257d4cf8bc83 100644 --- a/exec/slyedcfg.js +++ b/exec/slyedcfg.js @@ -1,7 +1,7 @@ // SlyEdit configurator: This is a menu-driven configuration program/script for SlyEdit. // Any changes are saved to SlyEdit.cfg in sbbs/mods, so that custom changes don't get // overridden with SlyEdit.cfg in sbbs/ctrl due to an update. -// Currently for SlyEdit 1.87. +// Currently for SlyEdit 1.88d. "use strict"; @@ -10,7 +10,7 @@ require("sbbsdefs.js", "P_NONE"); require("uifcdefs.js", "UIFC_INMSG"); -if (!uifc.init("SlyEdit 1.87 Configurator")) +if (!uifc.init("SlyEdit 1.88d Configurator")) { print("Failed to initialize uifc"); exit(1);