Skip to content

Commit 7aba1af

Browse files
committed
Emit .rc file with UTF16 encoding
This fixes encoding of characters that are not representable in ANSI. rc.exe doesn't support UTF8, but it does support UTF16. Fixes #172
1 parent 01ebb81 commit 7aba1af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Nerdbank.GitVersioning.Tasks/NativeVersionInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public override bool Execute()
124124
this.generator.EndFile();
125125

126126
Directory.CreateDirectory(Path.GetDirectoryName(this.OutputFile));
127-
Utilities.FileOperationWithRetry(() => File.WriteAllText(this.OutputFile, this.generator.GetCode()));
127+
Utilities.FileOperationWithRetry(() => File.WriteAllText(this.OutputFile, this.generator.GetCode(), Encoding.Unicode));
128128
}
129129

130130
return !this.Log.HasLoggedErrors;

0 commit comments

Comments
 (0)