{"action":"created","issue":{"url":"https://api.github.com/repos/azavea/django-queryset-csv/issues/67","labels_url":"https://api.github.com/repos/azavea/django-queryset-csv/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/azavea/django-queryset-csv/issues/67/comments","events_url":"https://api.github.com/repos/azavea/django-queryset-csv/issues/67/events","html_url":"https://github.com/azavea/django-queryset-csv/pull/67","id":87535034,"number":67,"title":"Fixing UnicodeEncodeError on localized field `verbose_name`.","user":{"login":"luanfonceca","id":1490875,"avatar_url":"https://avatars.githubusercontent.com/u/1490875?v=3","gravatar_id":"","url":"https://api.github.com/users/luanfonceca","html_url":"https://github.com/luanfonceca","followers_url":"https://api.github.com/users/luanfonceca/followers","following_url":"https://api.github.com/users/luanfonceca/following{/other_user}","gists_url":"https://api.github.com/users/luanfonceca/gists{/gist_id}","starred_url":"https://api.github.com/users/luanfonceca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luanfonceca/subscriptions","organizations_url":"https://api.github.com/users/luanfonceca/orgs","repos_url":"https://api.github.com/users/luanfonceca/repos","events_url":"https://api.github.com/users/luanfonceca/events{/privacy}","received_events_url":"https://api.github.com/users/luanfonceca/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-11T23:14:09Z","updated_at":"2015-06-13T15:05:45Z","closed_at":"2015-06-12T22:40:40Z","pull_request":{"url":"https://api.github.com/repos/azavea/django-queryset-csv/pulls/67","html_url":"https://github.com/azavea/django-queryset-csv/pull/67","diff_url":"https://github.com/azavea/django-queryset-csv/pull/67.diff","patch_url":"https://github.com/azavea/django-queryset-csv/pull/67.patch"},"body":"I think the problem is because i have an verbose_name translate to `Título`, and the `djqscsv` is not dealing right with it.\r\n\r\nI am receiving an error when I try to export some queryset, so I encoded the `verbose_name` after the `write_csv` and it fixed.\r\n\r\n```\r\nEnvironment:\r\n\r\n\r\nRequest Method: GET\r\nRequest URL: http://myurl/export/\r\n\r\nDjango Version: 1.7.4\r\nPython Version: 2.7.3\r\nInstalled Applications:\r\n['deck',\r\n 'core',\r\n 'jury',\r\n 'activelink',\r\n 'django_extensions',\r\n 'vanilla',\r\n 'bootstrap3',\r\n 'allauth',\r\n 'allauth.account',\r\n 'allauth.socialaccount',\r\n 'allauth.socialaccount.providers.google',\r\n 'allauth.socialaccount.providers.github',\r\n 'allauth.socialaccount.providers.facebook',\r\n 'debug_toolbar',\r\n 'datetimewidget',\r\n 'raven.contrib.django.raven_compat',\r\n 'django.contrib.admin',\r\n 'django.contrib.auth',\r\n 'django.contrib.contenttypes',\r\n 'django.contrib.sessions',\r\n 'django.contrib.messages',\r\n 'django.contrib.staticfiles',\r\n 'django.contrib.sites']\r\nInstalled Middleware:\r\n('django.contrib.auth.backends.ModelBackend',\r\n 'django.middleware.common.CommonMiddleware',\r\n 'django.contrib.sessions.middleware.SessionMiddleware',\r\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\r\n 'django.contrib.messages.middleware.MessageMiddleware')\r\n\r\n\r\nTraceback:\r\nFile \"/home/virtualenv/local/lib/python2.7/site-packages/django/core/handlers/base.py\" in get_response\r\n  111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\nFile \"/home/virtualenv/local/lib/python2.7/site-packages/django/views/generic/base.py\" in view\r\n  69.             return self.dispatch(request, *args, **kwargs)\r\nFile \"/home/virtualenv/local/lib/python2.7/site-packages/django/utils/decorators.py\" in _wrapper\r\n  29.             return bound_func(*args, **kwargs)\r\nFile \"/home/virtualenv/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py\" in _wrapped_view\r\n  21.                 return view_func(request, *args, **kwargs)\r\nFile \"/home/virtualenv/local/lib/python2.7/site-packages/django/utils/decorators.py\" in bound_func\r\n  25.                 return func.__get__(self, type(self))(*args2, **kwargs2)\r\nFile \"./deck/views.py\" in dispatch\r\n  118.         return super(ExportEvent, self).dispatch(*args, **kwargs)\r\nFile \"/home/virtualenv/local/lib/python2.7/site-packages/django/views/generic/base.py\" in dispatch\r\n  87.         return handler(request, *args, **kwargs)\r\nFile \"./deck/views.py\" in get\r\n  133.             field_header_map=field_header_map\r\nFile \"/home/virtualenv/local/lib/python2.7/site-packages/djqscsv/djqscsv.py\" in render_to_csv_response\r\n  49.     write_csv(queryset, response, **kwargs)\r\nFile \"/home/virtualenv/local/lib/python2.7/site-packages/djqscsv/djqscsv.py\" in write_csv\r\n  122.     writer.writerow(merged_header_map)\r\nFile \"/usr/lib/python2.7/csv.py\" in writerow\r\n  148.         return self.writer.writerow(self._dict_to_list(rowdict))\r\n\r\nException Type: UnicodeEncodeError at /myurl/export/\r\nException Value: 'ascii' codec can't encode character u'\\xed' in position 1: ordinal not in range(128)\r\n```"},"comment":{"url":"https://api.github.com/repos/azavea/django-queryset-csv/issues/comments/111717659","html_url":"https://github.com/azavea/django-queryset-csv/pull/67#issuecomment-111717659","issue_url":"https://api.github.com/repos/azavea/django-queryset-csv/issues/67","id":111717659,"user":{"login":"luanfonceca","id":1490875,"avatar_url":"https://avatars.githubusercontent.com/u/1490875?v=3","gravatar_id":"","url":"https://api.github.com/users/luanfonceca","html_url":"https://github.com/luanfonceca","followers_url":"https://api.github.com/users/luanfonceca/followers","following_url":"https://api.github.com/users/luanfonceca/following{/other_user}","gists_url":"https://api.github.com/users/luanfonceca/gists{/gist_id}","starred_url":"https://api.github.com/users/luanfonceca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luanfonceca/subscriptions","organizations_url":"https://api.github.com/users/luanfonceca/orgs","repos_url":"https://api.github.com/users/luanfonceca/repos","events_url":"https://api.github.com/users/luanfonceca/events{/privacy}","received_events_url":"https://api.github.com/users/luanfonceca/received_events","type":"User","site_admin":false},"created_at":"2015-06-13T15:05:45Z","updated_at":"2015-06-13T15:05:45Z","body":"o/"}}