@vlasky/zongji 0.5.8 → 0.5.9
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.
- package/lib/common.js +11 -2
- package/package.json +6 -5
package/lib/common.js
CHANGED
|
@@ -440,8 +440,17 @@ exports.readMysqlValue = function(
|
|
|
440
440
|
// e.g. TINYTEXT, MEDIUMTEXT, LONGTEXT, TEXT data types
|
|
441
441
|
if (column.charset !== null) {
|
|
442
442
|
// Javascript UTF8 always allows up to 4 bytes per character
|
|
443
|
-
|
|
444
|
-
|
|
443
|
+
switch (column.charset) {
|
|
444
|
+
case 'utf8mb3':
|
|
445
|
+
case 'utf8mb4':
|
|
446
|
+
column.charset = 'utf8';
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
try {
|
|
450
|
+
result = iconv.decode(result, column.charset);
|
|
451
|
+
} catch (err) {
|
|
452
|
+
console.warn(err);
|
|
453
|
+
}
|
|
445
454
|
}
|
|
446
455
|
break;
|
|
447
456
|
case MysqlTypes.JSON:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vlasky/zongji",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.9",
|
|
4
4
|
"description": "A MySQL 8.0-compatible fork of ZongJi - a MySQL binlog listener for Node.js.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"rfanth <rfa@rfanth.com> (https://github.com/rfanth)",
|
|
26
26
|
"Alexander Radyushin <alexander@fjedi.com> (https://github.com/fjedi)",
|
|
27
27
|
"Yousef El-Dardiry <yousefdardiry@gmail.com> (https://github.com/YousefED)",
|
|
28
|
-
"Roopendra Talekar <roopendratalekar@gmail.com> (https://github.com/roopen219)"
|
|
28
|
+
"Roopendra Talekar <roopendratalekar@gmail.com> (https://github.com/roopen219)",
|
|
29
|
+
"Juan Ferrer Toribio (https://github.com/juan-ferrer-toribio)"
|
|
29
30
|
],
|
|
30
31
|
"license": "MIT",
|
|
31
32
|
"engines": {
|
|
@@ -36,8 +37,8 @@
|
|
|
36
37
|
"tap": "14.10.7"
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"big-integer": "1.6.
|
|
40
|
-
"iconv-lite": "0.6.
|
|
41
|
-
"@vlasky/mysql": "^2.18.
|
|
40
|
+
"big-integer": "1.6.51",
|
|
41
|
+
"iconv-lite": "0.6.3",
|
|
42
|
+
"@vlasky/mysql": "^2.18.6"
|
|
42
43
|
}
|
|
43
44
|
}
|