summaryrefslogtreecommitdiff
path: root/pygments/formatter.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-08 09:21:15 +0200
committerGeorg Brandl <georg@python.org>2014-10-08 09:21:15 +0200
commit444fb6fd9b3492040a36fcca672fee8175f8d603 (patch)
tree2bd411ca78decf276b95dc6b1788e594b2e35287 /pygments/formatter.py
parent491fec23ef01687906f5d71ee718522cd2917926 (diff)
parentc1bfe4eed3805d3556bffa3c6b9cc2d3f6976205 (diff)
downloadpygments-444fb6fd9b3492040a36fcca672fee8175f8d603.tar.gz
Merged in leodemoura/pygments-main (pull request #399)
Diffstat (limited to 'pygments/formatter.py')
-rw-r--r--pygments/formatter.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pygments/formatter.py b/pygments/formatter.py
index b16ffee8..86821383 100644
--- a/pygments/formatter.py
+++ b/pygments/formatter.py
@@ -68,10 +68,10 @@ 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
+ if self.encoding in ('guess', 'chardet'):
+ # can happen for e.g. pygmentize -O encoding=guess
self.encoding = 'utf-8'
- self.encoding = options.get('outencoding', None) or self.encoding
+ self.encoding = options.get('outencoding') or self.encoding
self.options = options
def get_style_defs(self, arg=''):