From 395795e9aa00a922b4839019ca9e28438d0b3985 Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Wed, 12 Mar 2014 10:58:05 +0100 Subject: forced json output to utf-8 diff --git a/program/views.py b/program/views.py index 49bcd57..bc7700e 100644 --- a/program/views.py +++ b/program/views.py @@ -146,7 +146,7 @@ def json_day_schedule(request, year=None, month=None, day=None): else: schedule.append((ts.start.strftime('%H:%M:%S'), ts.programslot.show.name, -1)) - return HttpResponse(json.dumps(schedule), content_type="application/json; charset=utf-8") + return HttpResponse(json.dumps(schedule, ensure_ascii=False, encoding='utf8').encode('utf8'), content_type="application/json; charset=utf-8") def tofirstdayinisoweek(year, week): # http://stackoverflow.com/questions/5882405/get-date-from-iso-week-number-in-python -- cgit v0.10.2