Skip to content

Commit

Permalink
The reg file can be ascii-encoded.
Browse files Browse the repository at this point in the history
Any non-ascii characters should appear only inside SZ strings and be hex-encoded.
All the names in the schema can be represented in 7-bit ASCII characters so there's
no need to support other encodings.

Signed-off-by: Eric Promislow <[email protected]>
  • Loading branch information
ericpromislow committed May 12, 2023
1 parent 2a108d4 commit 8d35f55
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ async function clearRegistry() {
}

async function installInRegistry(regFileContents: string) {
const BOM = ''; // \uFEFF';

await fs.promises.writeFile(regFilePath, BOM + regFileContents, { encoding: 'latin1' });
await fs.promises.writeFile(regFilePath, regFileContents, { encoding: 'ascii' });
try {
await spawnFile('reg', ['IMPORT', regFilePath]);
} catch (ex: any) {
Expand Down

0 comments on commit 8d35f55

Please sign in to comment.