Skip to content

Commit fd52d51

Browse files
authored
Always write as utf8 (#54)
Fixes #50 Since we explicitly always read assuming utf8, we should also write assuming utf8. See also: http://utf8everywhere.org/
1 parent d0db27f commit fd52d51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

async-to-gen

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,11 @@ function transformAndOutput(content, outFile, source) {
202202
}
203203

204204
if (outFile) {
205-
fs.writeFileSync(outFile, code);
205+
fs.writeFileSync(outFile, code, 'utf8');
206206
info(fileName + '\n \u21B3 \033[32m' + outFile + '\033[0m\n');
207207
if (sourceMaps && !inlineSourceMaps) {
208208
var mapOutFile = outFile + '.map';
209-
fs.writeFileSync(mapOutFile, JSON.stringify(map) + '\n');
209+
fs.writeFileSync(mapOutFile, JSON.stringify(map) + '\n', 'utf8');
210210
info('\033[2m \u21B3 \033[32m' + mapOutFile + '\033[0m\n');
211211
}
212212
} else {

0 commit comments

Comments
 (0)