4 # Author: Lea Wiemann <LeWiemann@gmail.com>
5 # Copyright: This module has been placed in the public domain.
8 Miscellaneous HTML writer tests.
11 from __init__
import DocutilsTestSupport
12 from docutils
import core
13 from docutils
._compat
import b
16 class EncodingTestCase(DocutilsTestSupport
.StandardTestCase
):
18 def test_xmlcharrefreplace(self
):
19 # Test that xmlcharrefreplace is the default output encoding
22 'output_encoding': 'latin1',
24 '_disable_config': 1,}
25 result
= core
.publish_string(
26 b('EUR = \xe2\x82\xac'), writer_name
='html4css1',
27 settings_overrides
=settings_overrides
)
28 # Encoding a euro sign with latin1 doesn't work, so the
29 # xmlcharrefreplace handler is used.
30 self
.assert_(result
.find(b('EUR = €')) != -1)
33 if __name__
== '__main__':