diff options
Diffstat (limited to 'pygments/formatter.py')
-rw-r--r-- | pygments/formatter.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pygments/formatter.py b/pygments/formatter.py index d6b48475..4082150b 100644 --- a/pygments/formatter.py +++ b/pygments/formatter.py @@ -38,12 +38,17 @@ class Formatter(object): ``title`` If ``full`` is true, the title that should be used to caption the document (default: ''). + ``encoding`` + If given, must be an encoding name. This will be used to + convert the Unicode token strings to byte strings in the + output (default: 'latin1'). """ def __init__(self, **options): self.style = _lookup_style(options.get('style', 'default')) self.full = get_bool_opt(options, 'full', False) self.title = options.get('title', '') + self.encoding = options.get('encoding', 'latin1') self.options = options def get_style_defs(self, arg=''): |