Skip to content

Commit

Permalink
Try and treat log files as UTF-8 encoded, but fallback to replacing
Browse files Browse the repository at this point in the history
unknown characters with placeholders.
  • Loading branch information
Chris AtLee committed Mar 8, 2010
1 parent a9662ca commit b19876d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildbot/status/web/logs.py
Expand Up @@ -65,7 +65,7 @@ def content(self, entries):
if not self.asText:
# jinja only works with unicode, or pure ascii, so assume utf-8 in logs
if not isinstance(entry, unicode):
entry = unicode(entry, 'utf-8')
entry = unicode(entry, 'utf-8', 'replace')
html_entries.append(dict(type = builder.ChunkTypes[type],
text = entry,
is_header = is_header))
Expand Down

0 comments on commit b19876d

Please sign in to comment.