﻿id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release
10848,Encode data as utf-8 during csv export,anonymous,Ryan J Ollos,"If the database utf-8 encoded data is used it cannot be exported as the csvwriter will convert to ascii automatically.

Below is a small fix to solve the problem:
{{{
#!patch
--- hours.py	2013-02-01 11:14:35.059829098 +0100
+++ hours.py.no-utf8	2013-01-30 15:22:38.300399554 +0100
@@ -1015,10 +1015,10 @@
 
         for groupname, results in data['groups']:
             if groupname:
-                writer.writerow(unicode(groupname).encode('utf-8'))
-            writer.writerow([unicode(header['label']).encode('utf-8') for header in data['headers']])
+                writer.writerow(groupname)
+            writer.writerow([header['label'] for header in data['headers']])
             for result in results:
-                writer.writerow([unicode(result[header['name']]).encode('utf-8') 
+                writer.writerow([result[header['name']] 
                                  for header in data['headers']])
             writer.writerow([])
}}}",defect,new,normal,TracHoursPlugin,normal,,,,
