Commit 5ee3a299 authored by Eva Schiffer's avatar Eva Schiffer
Browse files

specify encoding when creating reports in the gui to fix stats display

parent e69db0db
......@@ -107,9 +107,9 @@ class GlanceGUIStats (object) :
kwargs = { constants.RUN_INFO_DICT_KEY: tempInfo,
constants.STATS_INFO_DICT_KEY: tempStatsDict,
constants.GROUPED_STATS_INFO_DICT_KEY: stats.group_stats_by_file(tempStatsDict), }
# use a mako template to render an html verion of the stats for display
templateLookup = TemplateLookup(directories=[resource_filename(__name__, ".")])
templateLookup = TemplateLookup(directories=[resource_filename(__name__, ".")], input_encoding='utf-8', output_encoding='utf-8')
guiTemplate = Template(resource_string(__name__, GUI_STATS_REPORT_TEMPLATE), lookup=templateLookup)
renderedText = guiTemplate.render(**kwargs)
......@@ -135,7 +135,7 @@ class GlanceGUIStats (object) :
}
# use a mako template to render an html verion of the stats for display
templateLookup = TemplateLookup(directories=[resource_filename(__name__, ".")])
templateLookup = TemplateLookup(directories=[resource_filename(__name__, ".")], input_encoding='utf-8', output_encoding='utf-8')
guiTemplate = Template(resource_string(__name__, GUI_STATS_REPORT_TEMPLATE), lookup=templateLookup)
renderedText = guiTemplate.render(**kwargs)
......@@ -165,7 +165,7 @@ class GlanceGUIStats (object) :
if packedData is not None :
# use a mako template to render an html verion of the global attributes for display
templateLookup = TemplateLookup(directories=[resource_filename(__name__, ".")])
templateLookup = TemplateLookup(directories=[resource_filename(__name__, ".")], input_encoding='utf-8', output_encoding='utf-8')
guiTemplate = Template(resource_string(__name__, GUI_G_ATTRS_REPORT_TEMPLATE), lookup=templateLookup)
renderedText = guiTemplate.render(**packedData)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment