summaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2006-12-20 21:14:44 +0100
committergbrandl <devnull@localhost>2006-12-20 21:14:44 +0100
commit1d634b6950bfac268f6d05a673fd48094738f01e (patch)
tree2788e9f4315a10392eee6371860c6045f8f74e31 /docs/src
parent25ad3be9474211bb8a652deadea00677886dadf5 (diff)
downloadpygments-1d634b6950bfac268f6d05a673fd48094738f01e.tar.gz
[svn] Improve Unicode handling without encoding.
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/formatters.txt7
-rw-r--r--docs/src/lexers.txt2
2 files changed, 8 insertions, 1 deletions
diff --git a/docs/src/formatters.txt b/docs/src/formatters.txt
index b54491cc..b4d8dc65 100644
--- a/docs/src/formatters.txt
+++ b/docs/src/formatters.txt
@@ -12,14 +12,19 @@ Common options
All formatters support this option:
`encoding`
+ *New in Pygments 0.6.*
+
If given, must be an encoding name (such as ``"utf-8"``). This will
be used to convert the token strings (which are Unicode strings)
- to byte strings in the output (default: ``"latin1"``).
+ to byte strings in the output (default: ``None``).
It will also be written in an encoding declaration suitable for the
document format if the `full` option is given (e.g. a ``meta
content-type`` directive in HTML or an invocation of the `inputenc`
package in LaTeX).
+ If this is ``""`` or ``None``, Unicode strings will be written
+ to the output file, which most file-like objects do not support.
+
The `HtmlFormatter` and `LatexFormatter` classes support these options:
`style`
diff --git a/docs/src/lexers.txt b/docs/src/lexers.txt
index ff20c241..92cb816f 100644
--- a/docs/src/lexers.txt
+++ b/docs/src/lexers.txt
@@ -19,6 +19,8 @@ Currently, **all lexers** support these options:
If given and greater than 0, expand tabs in the input (default: ``0``).
`encoding`
+ *New in Pygments 0.6.*
+
If given, must be an encoding name (such as ``"utf-8"``). This encoding
will be used to convert the input string to Unicode (if it is not already
a Unicode string). The default is ``"latin1"``.