kopia lustrzana https://github.com/backface/turtlestitch
Unicode: Properly handle multi-byte emoji with hyperblocks
rodzic
5af67eae8b
commit
b9c7198a77
|
@ -4344,15 +4344,16 @@ Process.prototype.reportStringSize = function (data) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Process.prototype.reportUnicode = function (string) {
|
Process.prototype.reportUnicode = function (string) {
|
||||||
var str;
|
var str, unicodeList;
|
||||||
|
|
||||||
if (this.enableHyperOps) {
|
if (this.enableHyperOps) {
|
||||||
if (string instanceof List) {
|
if (string instanceof List) {
|
||||||
return string.map(each => this.reportUnicode(each));
|
return string.map(each => this.reportUnicode(each));
|
||||||
}
|
}
|
||||||
str = isNil(string) ? '\u0000' : string.toString();
|
str = isNil(string) ? '\u0000' : string.toString();
|
||||||
if (str.length > 1) {
|
unicodeList = Array.from(str);
|
||||||
return this.reportUnicode(new List(Array.from(str)));
|
if (unicodeList.length > 1) {
|
||||||
|
return this.reportUnicode(new List(unicodeList));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
str = isNil(string) ? '\u0000' : string.toString();
|
str = isNil(string) ? '\u0000' : string.toString();
|
||||||
|
|
Ładowanie…
Reference in New Issue