mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Escape undefined unicode characters in string literal
This commit is contained in:
parent
b409355000
commit
8e67fe0168
|
@ -67,7 +67,8 @@ public final class RenderingUtil {
|
||||||
if (c < ' ') {
|
if (c < ' ') {
|
||||||
sb.append("\\u00").append(Character.forDigit(c / 16, 16))
|
sb.append("\\u00").append(Character.forDigit(c / 16, 16))
|
||||||
.append(Character.forDigit(c % 16, 16));
|
.append(Character.forDigit(c % 16, 16));
|
||||||
} else if (Character.isLowSurrogate(c) || Character.isHighSurrogate(c)) {
|
} else if (Character.isLowSurrogate(c) || Character.isHighSurrogate(c)
|
||||||
|
|| !Character.isDefined(c)) {
|
||||||
sb.append("\\u")
|
sb.append("\\u")
|
||||||
.append(Character.forDigit(c / 0x1000, 0x10))
|
.append(Character.forDigit(c / 0x1000, 0x10))
|
||||||
.append(Character.forDigit((c / 0x100) % 0x10, 0x10))
|
.append(Character.forDigit((c / 0x100) % 0x10, 0x10))
|
||||||
|
|
|
@ -73,6 +73,7 @@ async function runAll() {
|
||||||
});
|
});
|
||||||
|
|
||||||
const endTime = new Date().getTime();
|
const endTime = new Date().getTime();
|
||||||
|
console.log();
|
||||||
for (let i = 0; i < stats.testsFailed.length; i++) {
|
for (let i = 0; i < stats.testsFailed.length; i++) {
|
||||||
const failedTest = stats.testsFailed[i];
|
const failedTest = stats.testsFailed[i];
|
||||||
console.log("(" + (i + 1) + ") " + failedTest.path +":");
|
console.log("(" + (i + 1) + ") " + failedTest.path +":");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user