summaryrefslogtreecommitdiffstats
path: root/Doc/library/tokenize.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-03-18 22:29:52 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-03-18 22:29:52 (GMT)
commit689a55809818a846d2733241642572840d20570b (patch)
tree3df23660fca4efa2d5833188fbc26ac6ee25bdc2 /Doc/library/tokenize.rst
parent8c8042734aa4500db9072ef56548b544d881b5b1 (diff)
downloadcpython-689a55809818a846d2733241642572840d20570b.zip
cpython-689a55809818a846d2733241642572840d20570b.tar.gz
cpython-689a55809818a846d2733241642572840d20570b.tar.bz2
in tokenize.detect_encoding(), return utf-8-sig when a BOM is found
Diffstat (limited to 'Doc/library/tokenize.rst')
-rw-r--r--Doc/library/tokenize.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/tokenize.rst b/Doc/library/tokenize.rst
index 7017045..ac6ae36 100644
--- a/Doc/library/tokenize.rst
+++ b/Doc/library/tokenize.rst
@@ -95,7 +95,8 @@ function it uses to do this is available:
It detects the encoding from the presence of a UTF-8 BOM or an encoding
cookie as specified in :pep:`263`. If both a BOM and a cookie are present,
- but disagree, a SyntaxError will be raised.
+ but disagree, a SyntaxError will be raised. Note that if the BOM is found,
+ ``'utf-8-sig'`` will be returned as an encoding.
If no encoding is specified, then the default of ``'utf-8'`` will be returned.