Skip to content

Commit ba92854

Browse files
ezzatrondevelar
authored andcommitted
fix(dmg): correctly encode Unicode characters in DMG licenses (#4428)
Fixes a bug where licenses containing characters that are outside the standard ASCII 7-bit character set would not contain the correct content when added to macOS DMGs. The RTF escape sequence used to encode these characters was missing the "placeholder" character that should be present after the code point data. This commit adds a ? (question mark) character as the placeholder.
1 parent e182787 commit ba92854

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/dmg-builder/src/dmgLicense.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function getRtfUnicodeEscapedString(text: string) {
9494
result += text[i]
9595
}
9696
else {
97-
result += `\\u${text.codePointAt(i)}`
97+
result += `\\u${text.codePointAt(i)}?`
9898
}
9999
}
100100
return result
@@ -218,4 +218,4 @@ const regionCodes: any = {
218218
ne_NP: 106,
219219
kl: 107,
220220
en_IE: 108
221-
}
221+
}

0 commit comments

Comments
 (0)