diff --git a/support/schema/gendummydata.py b/support/schema/gendummydata.py index 68f58b6..b8944cb 100755 --- a/support/schema/gendummydata.py +++ b/support/schema/gendummydata.py @@ -9,6 +9,7 @@ usage: gendummydata.py outputfilename.sql # package names. It generates the SQL statements to # insert these users/packages into the AUR database. # +import codecs import random import time import os @@ -86,7 +87,7 @@ def genUID(): # load the words, and make sure there are enough words for users/pkgs # log.debug("Grabbing words from seed file...") -fp = open(SEED_FILE, "r") +fp = codecs.open(SEED_FILE, "r", encoding="utf-8") contents = fp.readlines() fp.close() if MAX_USERS > len(contents): @@ -141,7 +142,7 @@ has_tus = 0 # Just let python throw the errors if any happen # -out = open(sys.argv[1], "w") +out = codecs.open(sys.argv[1], "w", encoding="utf-8") out.write("BEGIN;\n") # Begin by creating the User statements