added utf8 support & added confdump.venv to gitignore

This commit is contained in:
autonomic 2022-03-01 17:32:30 +01:00
parent a22702be1f
commit 5928295f37
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
# security leaks?; # security leaks?;
.env .env
mydata mydata
confdump.venv
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/ __pycache__/

View File

@ -218,7 +218,7 @@ def main() -> int:
print("input directory does not exist") print("input directory does not exist")
return 1 return 1
connection = mysql.connect(host=args.host, port=args.port, user=args.user, password=args.password, db=args.db) connection = mysql.connect(host=args.host, port=args.port, user=args.user, password=args.password, db=args.db, charset='utf8', use_unicode=True)
connection.autocommit(True) connection.autocommit(True)
cursor = connection.cursor() cursor = connection.cursor()
cursor.execute("SET FOREIGN_KEY_CHECKS=0;") cursor.execute("SET FOREIGN_KEY_CHECKS=0;")