summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pygments/formatter.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pygments/formatter.py b/pygments/formatter.py
index 4b69f2a4..c1d6f2e1 100644
--- a/pygments/formatter.py
+++ b/pygments/formatter.py
@@ -68,6 +68,9 @@ class Formatter(object):
self.full = get_bool_opt(options, 'full', False)
self.title = options.get('title', '')
self.encoding = options.get('encoding', None) or None
+ if self.encoding == 'guess':
+ # can happen for pygmentize -O encoding=guess
+ self.encoding = 'utf-8'
self.encoding = options.get('outencoding', None) or self.encoding
self.options = options