diff options
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/unicode.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/src/unicode.txt b/docs/src/unicode.txt index 241609d3..07d32b03 100644 --- a/docs/src/unicode.txt +++ b/docs/src/unicode.txt @@ -9,13 +9,13 @@ wrong encoding. Per default all lexers have `encoding` set to `latin1`. If you pass a lexer a string object (not unicode) it tries to decode the data using this encoding. You can override the encoding using the `encoding` lexer option. If you have the -`chardet`_ library installed and set the encoding to ``guess`` if will ananlyse +`chardet`_ library installed and set the encoding to ``chardet`` if will ananlyse the text and fetch the best encoding automatically: .. sourcecode:: python from pygments.lexers import PythonLexer - lexer = PythonLexer(encoding='guess') + lexer = PythonLexer(encoding='chardet') The best way is to pass Pygments unicode objects. In that case you can't get unexpected output. |