File: encoding.html

package info (click to toggle)
epydoc 3.0.1%2Bdfsg-5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,412 kB
  • ctags: 29,831
  • sloc: python: 14,318; makefile: 55; sh: 7
file content (300 lines) | stat: -rw-r--r-- 22,072 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
<?xml version="1.0" encoding="ascii" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ascii" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<title>End-to-end Tests for Unicode Encoding</title>
<link rel="stylesheet" href="../custom.css" type="text/css" />
</head>
<body>
<div class="document" id="end-to-end-tests-for-unicode-encoding">
<h1 class="title">End-to-end Tests for Unicode Encoding</h1>

<div class="section" id="test-function">
<h1>Test Function</h1>
<p>The function <cite>testencoding</cite> is used as an end-to-end test for unicode
encodings.  It takes a given string, writes it to a python file, and
processes that file's documentation.  It then generates HTML output
from the documentation, extracts all docstrings from the generated
HTML output, and displays them.  (In order to extract &amp; display all
docstrings, it monkey-patches the HMTLwriter.docstring_to_html()
method.)</p>
<blockquote>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">from</span> epydoc.test.util <span class="py-keyword">import</span> testencoding</pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">from</span> epydoc.test.util <span class="py-keyword">import</span> print_warnings
<span class="py-prompt">&gt;&gt;&gt; </span>print_warnings()</pre>
</blockquote>
</div>
<div class="section" id="encoding-tests">
<h1>Encoding Tests</h1>
<p>This section tests the output for a variety of different encodings.
Note that some encodings (such as cp424) are not supported, since
the ascii coding directive would result in a syntax error in the
new encoding.</p>
<p>Tests for several Microsoft codepges:</p>
<blockquote>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: cp874 -*-</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;abc ABC 123 \x80 \x85&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">&lt;p&gt;abc ABC 123 &amp;#8364; &amp;#8230;&lt;/p&gt;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: cp1250 -*-</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;abc ABC 123 \x80 \x82 \x84 \x85 \xff&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">&lt;p&gt;abc ABC 123 &amp;#8364; &amp;#8218; &amp;#8222; &amp;#8230; &amp;#729;&lt;/p&gt;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: cp1251 -*-</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;abc ABC 123 \x80 \x81 \x82 \xff&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">&lt;p&gt;abc ABC 123 &amp;#1026; &amp;#1027; &amp;#8218; &amp;#1103;&lt;/p&gt;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: cp1252 -*-</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;abc ABC 123 \x80 \x82 \x83 \xff&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">&lt;p&gt;abc ABC 123 &amp;#8364; &amp;#8218; &amp;#402; &amp;#255;&lt;/p&gt;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: cp1253 -*-</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;abc ABC 123 \x80 \x82 \x83 \xfe&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">&lt;p&gt;abc ABC 123 &amp;#8364; &amp;#8218; &amp;#402; &amp;#974;&lt;/p&gt;</span></pre>
</blockquote>
<p>Unicode tests:</p>
<blockquote>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>utf8_test =<span class="py-string">'''\</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;abc ABC 123</span>
<span class="py-more">...</span>
<span class="py-more">... </span><span class="py-string">0x80-0x7ff range:</span>
<span class="py-more">... </span><span class="py-string">\xc2\x80 \xc2\x81 \xdf\xbe \xdf\xbf</span>
<span class="py-more">...</span>
<span class="py-more">... </span><span class="py-string">0x800-0xffff range:</span>
<span class="py-more">... </span><span class="py-string">\xe0\xa0\x80 \xe0\xa0\x81 \xef\xbf\xbe \xef\xbf\xbf</span>
<span class="py-more">...</span>
<span class="py-more">... </span><span class="py-string">0x10000-0x10ffff range:</span>
<span class="py-more">... </span><span class="py-string">\xf0\x90\x80\x80 \xf0\x90\x80\x81</span>
<span class="py-more">... </span><span class="py-string">\xf4\x8f\xbf\xbe \xf4\x8f\xbf\xbf</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;\n'''</span>
<span class="py-prompt">&gt;&gt;&gt; </span>utf8_bom = <span class="py-string">'\xef\xbb\xbf'</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-comment"># UTF-8 with a coding directive:</span>
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">&quot;# -*- coding: utf-8 -*-\n&quot;</span>+utf8_test)
<span class="py-output">&lt;p&gt;abc ABC 123&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x80-0x7ff range: &amp;#128; &amp;#129; &amp;#2046; &amp;#2047;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x800-0xffff range: &amp;#2048; &amp;#2049; &amp;#65534; &amp;#65535;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x10000-0x10ffff range: &amp;#65536; &amp;#65537; &amp;#1114110; &amp;#1114111;&lt;/p&gt;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-comment"># UTF-8 with a BOM &amp; a coding directive:</span>
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(utf8_bom+<span class="py-string">&quot;# -*- coding: utf-8 -*-\n&quot;</span>+utf8_test)
<span class="py-output">&lt;p&gt;abc ABC 123&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x80-0x7ff range: &amp;#128; &amp;#129; &amp;#2046; &amp;#2047;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x800-0xffff range: &amp;#2048; &amp;#2049; &amp;#65534; &amp;#65535;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x10000-0x10ffff range: &amp;#65536; &amp;#65537; &amp;#1114110; &amp;#1114111;&lt;/p&gt;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-comment"># UTF-8 with a BOM &amp; no coding directive:</span>
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(utf8_bom+utf8_test)
<span class="py-output">&lt;p&gt;abc ABC 123&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x80-0x7ff range: &amp;#128; &amp;#129; &amp;#2046; &amp;#2047;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x800-0xffff range: &amp;#2048; &amp;#2049; &amp;#65534; &amp;#65535;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x10000-0x10ffff range: &amp;#65536; &amp;#65537; &amp;#1114110; &amp;#1114111;&lt;/p&gt;</span></pre>
</blockquote>
<p>Tests for KOI8-R:</p>
<blockquote>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: koi8-r -*-</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;abc ABC 123 \x80 \x82 \x83 \xff&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">&lt;p&gt;abc ABC 123 &amp;#9472; &amp;#9484; &amp;#9488; &amp;#1066;&lt;/p&gt;</span></pre>
</blockquote>
<p>Tests for 'coding' directive on the second line:</p>
<blockquote>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''\n# -*- coding: cp1252 -*-</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;abc ABC 123 \x80 \x82 \x83 \xff&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">&lt;p&gt;abc ABC 123 &amp;#8364; &amp;#8218; &amp;#402; &amp;#255;&lt;/p&gt;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# comment on the first line.\n# -*- coding: cp1252 -*-</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;abc ABC 123 \x80 \x82 \x83 \xff&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">&lt;p&gt;abc ABC 123 &amp;#8364; &amp;#8218; &amp;#402; &amp;#255;&lt;/p&gt;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">&quot;\n# -*- coding: utf-8 -*-\n&quot;</span>+utf8_test)
<span class="py-output">&lt;p&gt;abc ABC 123&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x80-0x7ff range: &amp;#128; &amp;#129; &amp;#2046; &amp;#2047;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x800-0xffff range: &amp;#2048; &amp;#2049; &amp;#65534; &amp;#65535;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x10000-0x10ffff range: &amp;#65536; &amp;#65537; &amp;#1114110; &amp;#1114111;&lt;/p&gt;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">&quot;# comment\n# -*- coding: utf-8 -*-\n&quot;</span>+utf8_test)
<span class="py-output">&lt;p&gt;abc ABC 123&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x80-0x7ff range: &amp;#128; &amp;#129; &amp;#2046; &amp;#2047;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x800-0xffff range: &amp;#2048; &amp;#2049; &amp;#65534; &amp;#65535;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x10000-0x10ffff range: &amp;#65536; &amp;#65537; &amp;#1114110; &amp;#1114111;&lt;/p&gt;</span></pre>
</blockquote>
<p>Tests for shift-jis</p>
<blockquote>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: shift_jis -*-</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;abc ABC 123 \xA1 \xA2 \xA3&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>) <span class="py-comment"># doctest: +PYTHON2.4</span>
<span class="py-output">abc ABC 123 &amp;#65377; &amp;#65378; &amp;#65379;</span></pre>
</blockquote>
</div>
<div class="section" id="str-unicode-test">
<h1>Str/Unicode Test</h1>
<p>Make sure that we use the coding for both str and unicode docstrings.</p>
<blockquote>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: utf-8 -*-</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">&lt;p&gt;abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;&lt;/p&gt;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: utf-8 -*-</span>
<span class="py-more">... </span><span class="py-string">u&quot;&quot;&quot;abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">&lt;p&gt;abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;&lt;/p&gt;</span></pre>
</blockquote>
<p>Under special circumstances, we may not be able to tell what the
proper encoding for a docstring is.  This happens if:</p>
<ol class="arabic simple">
<li>the docstring is only available via introspection.</li>
<li>we are unable to determine what module the object that owns
the docstring came from.</li>
<li>the docstring contains non-ascii characters</li>
</ol>
<p>Under these circumstances, we issue a warning, and treat the docstring
as latin-1.  An example of this is a non-unicode docstring for
properties:</p>
<blockquote>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: utf-8 -*-</span>
<span class="py-more">... </span><span class="py-string">p=property(doc=&quot;&quot;&quot;\xc2\x80&quot;&quot;&quot;)</span>
<span class="py-more">... </span><span class="py-string">'''</span>) <span class="py-comment"># doctest: +ELLIPSIS</span>
<span class="py-output">&lt;property object at ...&gt;'s docstring is not a unicode string, but it contains non-ascii data -- treating it as latin-1.</span>
<span class="py-output">&amp;#194;&amp;#128;</span></pre>
</blockquote>
</div>
<div class="section" id="introspection-parsing-tests">
<h1>Introspection/Parsing Tests</h1>
<p>This section checks to make sure that both introspection &amp; parsing are
getting the right results.</p>
<blockquote>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">&quot;# -*- coding: utf-8 -*-\n&quot;</span>+utf8_test, introspect=False)
<span class="py-output">&lt;p&gt;abc ABC 123&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x80-0x7ff range: &amp;#128; &amp;#129; &amp;#2046; &amp;#2047;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x800-0xffff range: &amp;#2048; &amp;#2049; &amp;#65534; &amp;#65535;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x10000-0x10ffff range: &amp;#65536; &amp;#65537; &amp;#1114110; &amp;#1114111;&lt;/p&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>testencoding(utf8_bom+<span class="py-string">&quot;# -*- coding: utf-8 -*-\n&quot;</span>+utf8_test, introspect=False)
<span class="py-output">&lt;p&gt;abc ABC 123&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x80-0x7ff range: &amp;#128; &amp;#129; &amp;#2046; &amp;#2047;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x800-0xffff range: &amp;#2048; &amp;#2049; &amp;#65534; &amp;#65535;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x10000-0x10ffff range: &amp;#65536; &amp;#65537; &amp;#1114110; &amp;#1114111;&lt;/p&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>testencoding(utf8_bom+utf8_test, introspect=False)
<span class="py-output">&lt;p&gt;abc ABC 123&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x80-0x7ff range: &amp;#128; &amp;#129; &amp;#2046; &amp;#2047;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x800-0xffff range: &amp;#2048; &amp;#2049; &amp;#65534; &amp;#65535;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x10000-0x10ffff range: &amp;#65536; &amp;#65537; &amp;#1114110; &amp;#1114111;&lt;/p&gt;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">&quot;# -*- coding: utf-8 -*-\n&quot;</span>+utf8_test, parse=False)
<span class="py-output">&lt;p&gt;abc ABC 123&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x80-0x7ff range: &amp;#128; &amp;#129; &amp;#2046; &amp;#2047;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x800-0xffff range: &amp;#2048; &amp;#2049; &amp;#65534; &amp;#65535;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x10000-0x10ffff range: &amp;#65536; &amp;#65537; &amp;#1114110; &amp;#1114111;&lt;/p&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>testencoding(utf8_bom+<span class="py-string">&quot;# -*- coding: utf-8 -*-\n&quot;</span>+utf8_test, parse=False)
<span class="py-output">&lt;p&gt;abc ABC 123&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x80-0x7ff range: &amp;#128; &amp;#129; &amp;#2046; &amp;#2047;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x800-0xffff range: &amp;#2048; &amp;#2049; &amp;#65534; &amp;#65535;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x10000-0x10ffff range: &amp;#65536; &amp;#65537; &amp;#1114110; &amp;#1114111;&lt;/p&gt;</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>testencoding(utf8_bom+utf8_test, parse=False)
<span class="py-output">&lt;p&gt;abc ABC 123&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x80-0x7ff range: &amp;#128; &amp;#129; &amp;#2046; &amp;#2047;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x800-0xffff range: &amp;#2048; &amp;#2049; &amp;#65534; &amp;#65535;&lt;/p&gt;</span>
<span class="py-output">&lt;p&gt;0x10000-0x10ffff range: &amp;#65536; &amp;#65537; &amp;#1114110; &amp;#1114111;&lt;/p&gt;</span></pre>
</blockquote>
</div>
<div class="section" id="context-checks">
<h1>Context checks</h1>
<p>Make sure that docstrings are rendered correctly in different contexts.</p>
<blockquote>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: utf-8 -*-</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">@var x: abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80</span>
<span class="py-more">... </span><span class="py-string">@group \xc2\x80: x</span>
<span class="py-more">... </span><span class="py-string">&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: utf-8 -*-</span>
<span class="py-more">... </span><span class="py-string">def f(x):</span>
<span class="py-more">... </span><span class="py-string">    &quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">    abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80</span>
<span class="py-more">... </span><span class="py-string">    @param x: abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80</span>
<span class="py-more">... </span><span class="py-string">    @type x: abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80</span>
<span class="py-more">... </span><span class="py-string">    @return: abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80</span>
<span class="py-more">... </span><span class="py-string">    @rtype: abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80</span>
<span class="py-more">... </span><span class="py-string">    @except X: abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80</span>
<span class="py-more">... </span><span class="py-string">    &quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span>
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span>
<span class="py-output">&lt;p&gt;abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;&lt;/p&gt;</span>
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span>
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span>
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span>
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span>
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span></pre>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>testencoding(<span class="py-string">'''# -*- coding: utf-8 -*-</span>
<span class="py-more">... </span><span class="py-string">class A:</span>
<span class="py-more">... </span><span class="py-string">    &quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">    abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80</span>
<span class="py-more">... </span><span class="py-string">    @ivar x: abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80</span>
<span class="py-more">... </span><span class="py-string">    @cvar y: abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80</span>
<span class="py-more">... </span><span class="py-string">    @type x: abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80</span>
<span class="py-more">... </span><span class="py-string">    &quot;&quot;&quot;</span>
<span class="py-more">...</span>
<span class="py-more">... </span><span class="py-string">    z = property(doc=u&quot;abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80&quot;)</span>
<span class="py-more">... </span><span class="py-string">'''</span>)
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span>
<span class="py-output">&lt;p&gt;abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;&lt;/p&gt;</span>
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span>
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span>
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span>
<span class="py-output">abc ABC 123 &amp;#128; &amp;#2047; &amp;#2048;</span></pre>
</blockquote>
</div>
</div>
<table width="100%" class="navbox" cellpadding="1" cellspacing="0">
  <tr>
  <a class="nav" href="../index.html">
    <td align="center" width="20%" class="nav">
    <a class="nav" href="../index.html">
    Home</a></td></a>
  <a class="nav" href="../installing.html">
    <td align="center" width="20%" class="nav">
    <a class="nav" href="../installing.html">
    Installing Epydoc</a></td></a>
  <a class="nav" href="../using.html">
    <td align="center" width="20%" class="nav">
    <a class="nav" href="../using.html">
    Using Epydoc</a></td></a>
  <a class="nav" href="../epytext.html">
    <td align="center" width="20%" class="nav">
    <a class="nav" href="../epytext.html">
    Epytext</a></td></a>
  <td align="center" width="20%" class="nav">
    
    <A href="http://sourceforge.net/projects/epydoc"> 
    <IMG src="../sflogo.png" 
    width="88" height="26" border="0" alt="SourceForge"
    align="top"/></A></td>
    </tr>
</table>
</body>
</html>