Skip to content

Commit

Permalink
fix(dmg): correctly encode Unicode characters in DMG licenses (#4428)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ezzatron authored and develar committed Nov 22, 2019
1 parent e182787 commit ba92854
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/dmg-builder/src/dmgLicense.ts
Expand Up @@ -94,7 +94,7 @@ function getRtfUnicodeEscapedString(text: string) {
result += text[i]
}
else {
result += `\\u${text.codePointAt(i)}`
result += `\\u${text.codePointAt(i)}?`
}
}
return result
Expand Down Expand Up @@ -218,4 +218,4 @@ const regionCodes: any = {
ne_NP: 106,
kl: 107,
en_IE: 108
}
}

0 comments on commit ba92854

Please sign in to comment.