mirror of
https://github.com/fabrice404/olympics-calendar.git
synced 2026-02-14 12:19:04 +00:00
force encoding
This commit is contained in:
@ -27,6 +27,6 @@ export class Cache {
|
||||
this.debug(`set: key=${key}`);
|
||||
const path = this.cachePath(key);
|
||||
mkdirSync(path.split("/").slice(0, -1).join("/"), { recursive: true });
|
||||
writeFileSync(path, data);
|
||||
writeFileSync(path, data, "utf-8");
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ export class ICSGenerator {
|
||||
if (lines.length <= 10) {
|
||||
this.debug("Skipping empty ICS file:", filepath);
|
||||
} else {
|
||||
writeFileSync(filepath, lines.join("\n"));
|
||||
writeFileSync(filepath, lines.join("\n"), "utf-8");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ export class Scraper {
|
||||
private saveCalendar(): void {
|
||||
this.debug("saveCalendar");
|
||||
const calendar = this.getCalendar();
|
||||
writeFileSync("./output/calendar.json", JSON.stringify(calendar, null, 2));
|
||||
writeFileSync("./output/calendar.json", JSON.stringify(calendar, null, 2), "utf-8");
|
||||
}
|
||||
|
||||
private async scrapeEvents(): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user