diff options
author | Georg Brandl <georg@python.org> | 2014-10-08 09:21:15 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-08 09:21:15 +0200 |
commit | 444fb6fd9b3492040a36fcca672fee8175f8d603 (patch) | |
tree | 2bd411ca78decf276b95dc6b1788e594b2e35287 /pygments/formatter.py | |
parent | 491fec23ef01687906f5d71ee718522cd2917926 (diff) | |
parent | c1bfe4eed3805d3556bffa3c6b9cc2d3f6976205 (diff) | |
download | pygments-444fb6fd9b3492040a36fcca672fee8175f8d603.tar.gz |
Merged in leodemoura/pygments-main (pull request #399)
Diffstat (limited to 'pygments/formatter.py')
-rw-r--r-- | pygments/formatter.py | 6 |
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=''): |