Why is the below item failing? Why does it succeed with "latin-1" codec?
o = "a test of \\xe9 char" #I want this to remain a string as thi
In this case, I tried to execute a .py which active a path/file.sql.
My solution was to modify the codification of the file.sql to "UTF-8 without BOM" and it works!
You can do it with Notepad++.
i will leave a part of my code.
/Code/
con=psycopg2.connect(host = sys.argv[1], port = sys.argv[2],dbname = sys.argv[3],user = sys.argv[4], password = sys.argv[5])
cursor = con.cursor() sqlfile = open(path, 'r')