summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2008-06-19 14:38:56 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2008-06-19 14:38:56 +0000
commit5d09d8769d7eb7fd8dffdf5c0705e25173c59006 (patch)
treecc99931f0a25e35fe7d38c5b7fa796af01cfd454
parente726065d5d19bab23078c416513bc8cf9f40d20b (diff)
Fixed #6650 -- Added UTF-8 encoding to SQL output provided by management commands. Thanks to farcaller for the suggestion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/management/commands/sql.py2
-rw-r--r--django/core/management/commands/sqlall.py2
-rw-r--r--django/core/management/commands/sqlclear.py2
-rw-r--r--django/core/management/commands/sqlcustom.py2
-rw-r--r--django/core/management/commands/sqlflush.py2
-rw-r--r--django/core/management/commands/sqlindexes.py2
-rw-r--r--django/core/management/commands/sqlreset.py2
-rw-r--r--django/core/management/commands/sqlsequencereset.py2
8 files changed, 8 insertions, 8 deletions
diff --git a/django/core/management/commands/sql.py b/django/core/management/commands/sql.py
index 4a0107ac02..bc68a1e43a 100644
--- a/django/core/management/commands/sql.py
+++ b/django/core/management/commands/sql.py
@@ -7,4 +7,4 @@ class Command(AppCommand):
def handle_app(self, app, **options):
from django.core.management.sql import sql_create
- return '\n'.join(sql_create(app, self.style))
+ return u'\n'.join(sql_create(app, self.style)).encode('utf-8')
diff --git a/django/core/management/commands/sqlall.py b/django/core/management/commands/sqlall.py
index bf3c734bb6..5d510f179a 100644
--- a/django/core/management/commands/sqlall.py
+++ b/django/core/management/commands/sqlall.py
@@ -7,4 +7,4 @@ class Command(AppCommand):
def handle_app(self, app, **options):
from django.core.management.sql import sql_all
- return '\n'.join(sql_all(app, self.style))
+ return u'\n'.join(sql_all(app, self.style)).encode('utf-8')
diff --git a/django/core/management/commands/sqlclear.py b/django/core/management/commands/sqlclear.py
index d76d6f4de2..8550e88e28 100644
--- a/django/core/management/commands/sqlclear.py
+++ b/django/core/management/commands/sqlclear.py
@@ -7,4 +7,4 @@ class Command(AppCommand):
def handle_app(self, app, **options):
from django.core.management.sql import sql_delete
- return '\n'.join(sql_delete(app, self.style))
+ return u'\n'.join(sql_delete(app, self.style)).encode('utf-8')
diff --git a/django/core/management/commands/sqlcustom.py b/django/core/management/commands/sqlcustom.py
index 2148a9f307..90b90b6d49 100644
--- a/django/core/management/commands/sqlcustom.py
+++ b/django/core/management/commands/sqlcustom.py
@@ -7,4 +7,4 @@ class Command(AppCommand):
def handle_app(self, app, **options):
from django.core.management.sql import sql_custom
- return '\n'.join(sql_custom(app))
+ return u'\n'.join(sql_custom(app)).encode('utf-8')
diff --git a/django/core/management/commands/sqlflush.py b/django/core/management/commands/sqlflush.py
index 261aa0d423..d0f71d3875 100644
--- a/django/core/management/commands/sqlflush.py
+++ b/django/core/management/commands/sqlflush.py
@@ -7,4 +7,4 @@ class Command(NoArgsCommand):
def handle_noargs(self, **options):
from django.core.management.sql import sql_flush
- return '\n'.join(sql_flush(self.style, only_django=True))
+ return u'\n'.join(sql_flush(self.style, only_django=True)).encode('utf-8')
diff --git a/django/core/management/commands/sqlindexes.py b/django/core/management/commands/sqlindexes.py
index b5e86f26d6..9693588a89 100644
--- a/django/core/management/commands/sqlindexes.py
+++ b/django/core/management/commands/sqlindexes.py
@@ -7,4 +7,4 @@ class Command(AppCommand):
def handle_app(self, app, **options):
from django.core.management.sql import sql_indexes
- return '\n'.join(sql_indexes(app, self.style))
+ return u'\n'.join(sql_indexes(app, self.style)).encode('utf-8')
diff --git a/django/core/management/commands/sqlreset.py b/django/core/management/commands/sqlreset.py
index a2abb855cf..ec40848c42 100644
--- a/django/core/management/commands/sqlreset.py
+++ b/django/core/management/commands/sqlreset.py
@@ -7,4 +7,4 @@ class Command(AppCommand):
def handle_app(self, app, **options):
from django.core.management.sql import sql_reset
- return '\n'.join(sql_reset(app, self.style))
+ return u'\n'.join(sql_reset(app, self.style)).encode('utf-8')
diff --git a/django/core/management/commands/sqlsequencereset.py b/django/core/management/commands/sqlsequencereset.py
index 6b12d83843..e8dad0bef6 100644
--- a/django/core/management/commands/sqlsequencereset.py
+++ b/django/core/management/commands/sqlsequencereset.py
@@ -6,4 +6,4 @@ class Command(AppCommand):
def handle_app(self, app, **options):
from django.db import connection, models
- return '\n'.join(connection.ops.sequence_reset_sql(self.style, models.get_models(app)))
+ return u'\n'.join(connection.ops.sequence_reset_sql(self.style, models.get_models(app))).encode('utf-8')