Use `Array.from` which a more Unicode friendly form of `split()`.

snap7
Michael Ball 2021-12-11 13:34:37 -08:00
rodzic aea4daf03c
commit c67df0ad87
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -4352,7 +4352,7 @@ Process.prototype.reportUnicode = function (string) {
}
str = isNil(string) ? '\u0000' : string.toString();
if (str.length > 1) {
return this.reportUnicode(new List(str.split('')));
return this.reportUnicode(new List(Array.from(str)));
}
} else {
str = isNil(string) ? '\u0000' : string.toString();
@ -4421,8 +4421,7 @@ Process.prototype.reportBasicTextSplit = function (string, delimiter) {
del = /\s+/;
break;
case 'letter':
del = '';
break;
return Array.from(str);
case 'csv':
return this.parseCSV(string);
case 'json':