@tricoteuses/senat 2.14.7 → 2.14.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,6 @@ import StreamZip from "node-stream-zip";
|
|
|
8
8
|
import readline from "readline";
|
|
9
9
|
import windows1252 from "windows-1252";
|
|
10
10
|
import { pipeline } from "stream";
|
|
11
|
-
import iconv from "iconv-lite";
|
|
12
11
|
import { promisify } from "util";
|
|
13
12
|
import config from "../config";
|
|
14
13
|
import { getChosenDatasets, getEnabledDatasets } from "../datasets";
|
|
@@ -103,9 +102,9 @@ async function copyToSenat(dataset, dataDir, options) {
|
|
|
103
102
|
return parts.join('');
|
|
104
103
|
}
|
|
105
104
|
newLine = replacePublicOutsideStrings(line, dataset.database);
|
|
106
|
-
//
|
|
107
|
-
|
|
108
|
-
schemaSqlWriter.write(
|
|
105
|
+
// Replace SET client_encoding to UTF8
|
|
106
|
+
newLine = newLine.replace(/SET client_encoding = 'LATIN1';/i, "SET client_encoding = 'UTF8';");
|
|
107
|
+
schemaSqlWriter.write(newLine + "\n");
|
|
109
108
|
}
|
|
110
109
|
schemaSqlWriter.end();
|
|
111
110
|
await new Promise((resolve, reject) => {
|