Skip to content
Browse files

[py3] Fixed, used instead

  • Loading branch information...
1 parent 62a9ed0 commit 4e7f04cdad2eb1ec39ea2e3769657da082a6494f @akaariai akaariai committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 django/core/management/
5 django/core/management/
@@ -1,5 +1,6 @@
from __future__ import unicode_literals
+import codecs
import os
import re
@@ -168,10 +169,10 @@ def custom_sql_for_model(model, style, connection):
os.path.join(app_dir, "%s.sql" % opts.object_name.lower())]
for sql_file in sql_files:
if os.path.exists(sql_file):
- with open(sql_file, 'U') as fp:
+ with, 'U', encoding=settings.FILE_CHARSET) as fp:
# Some backends can't execute more than one SQL statement at a time,
# so split into separate statements.
- output.extend(_split_statements(
+ output.extend(_split_statements(
return output

0 comments on commit 4e7f04c

Please sign in to comment.
Something went wrong with that request. Please try again.