summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-04-23 14:19:00 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-04-23 14:19:00 -0400
commit16359a0f6cef98adf4da1dcd4a402fbdb6751e5d (patch)
treede2551bfb28c17e441f495a25f8da5ce6e0e1657 /scripts
parentaba4879418ece5fb1c1126d45dfefcca73b4abc7 (diff)
downloadthird_party-cobbler-16359a0f6cef98adf4da1dcd4a402fbdb6751e5d.tar.gz
third_party-cobbler-16359a0f6cef98adf4da1dcd4a402fbdb6751e5d.tar.xz
third_party-cobbler-16359a0f6cef98adf4da1dcd4a402fbdb6751e5d.zip
Apply unicode changes to webui also
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/index.py4
-rwxr-xr-xscripts/services.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/index.py b/scripts/index.py
index 281e36e..8d10129 100755
--- a/scripts/index.py
+++ b/scripts/index.py
@@ -122,8 +122,8 @@ def handler(req):
content = func( "Invalid Mode: \"%s\"" % mode )
# apache.log_error("%s:%s ... %s" % (my_user, my_uri, str(form)))
- req.content_type = "text/html"
- req.write(content)
+ req.content_type = "text/html;charset=utf-8"
+ req.write(unicode(content).encode('utf-8'))
return apache.OK
diff --git a/scripts/services.py b/scripts/services.py
index 2486a4a..b41d6a0 100755
--- a/scripts/services.py
+++ b/scripts/services.py
@@ -61,8 +61,8 @@ def handler(req):
# apache.log_error("%s:%s ... %s" % (my_user, my_uri, str(form)))
req.content_type = "text/plain;charset=utf-8"
- content = unicode(content)
- req.write(content.encode('utf-8'))
+ content = unicode(content).encode('utf-8')
+ req.write(content)
return apache.OK