summaryrefslogtreecommitdiff
path: root/Doc/lib/libcodecs.tex
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-03-17 16:26:31 +0000
committerGeorg Brandl <georg@python.org>2006-03-17 16:26:31 +0000
commitdb815abc70a20f81c9de1c99b9089944c802c715 (patch)
tree4fe27086334262c4177877d4401c40d16975a2e6 /Doc/lib/libcodecs.tex
parentda37604ee32cdefbb0184b7f34c97cf1aa1ec3cf (diff)
downloadcpython-git-db815abc70a20f81c9de1c99b9089944c802c715.tar.gz
More \exception fixes.
Diffstat (limited to 'Doc/lib/libcodecs.tex')
-rw-r--r--Doc/lib/libcodecs.tex10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/lib/libcodecs.tex b/Doc/lib/libcodecs.tex
index ac61743820..951a68ae7b 100644
--- a/Doc/lib/libcodecs.tex
+++ b/Doc/lib/libcodecs.tex
@@ -152,7 +152,7 @@ unencodable part of the input and a position where encoding should
continue. The encoder will encode the replacement and continue encoding
the original input at the specified position. Negative position values
will be treated as being relative to the end of the input string. If the
-resulting position is out of bound an IndexError will be raised.
+resulting position is out of bound an \exception{IndexError} will be raised.
Decoding and translating works similar, except \exception{UnicodeDecodeError}
or \exception{UnicodeTranslateError} will be passed to the handler and
@@ -696,10 +696,10 @@ transformation can be done (these methods are also called encodings).
The simplest method is to map the codepoints 0-255 to the bytes
\code{0x0}-\code{0xff}. This means that a unicode object that contains
codepoints above \code{U+00FF} can't be encoded with this method (which
-is called \code{'latin-1'} or \code{'iso-8859-1'}). unicode.encode() will
-raise a UnicodeEncodeError that looks like this: \samp{UnicodeEncodeError:
-'latin-1' codec can't encode character u'\e u1234' in position 3: ordinal
-not in range(256)}.
+is called \code{'latin-1'} or \code{'iso-8859-1'}).
+\function{unicode.encode()} will raise a \exception{UnicodeEncodeError}
+that looks like this: \samp{UnicodeEncodeError: 'latin-1' codec can't
+encode character u'\e u1234' in position 3: ordinal not in range(256)}.
There's another group of encodings (the so called charmap encodings)
that choose a different subset of all unicode code points and how