Commits

Oben Sonne committed c86e982

Add non-ASCII characters to example project

Comments (0)

Files changed (4)

 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 
 # =============================================================================
 #
 There is a bank in my eel, your argument is invalid.
 
 More nonsense at <http://automeme.net/>.
+
+No-ASCII characters like `öäüß` are no problems as long as input files are
+encoded in UTF8.
 """,
 
 # -----------------------------------------------------------------------------

tests/expected/input/blog.2010-02-22.Doctors_in_my_penguin.md

 There is a bank in my eel, your argument is invalid.
 
 More nonsense at <http://automeme.net/>.
+
+No-ASCII characters like `öäüß` are no problems as long as input files are
+encoded in UTF8.

tests/expected/output/blog.2010-02-22.Doctors_in_my_penguin.html

 <p><em>Posted at
 February 22, 2010</em></p>
 <p>There is a bank in my eel, your argument is invalid.</p>
-<p>More nonsense at <a href="http://automeme.net/">http://automeme.net/</a>.</p></div>
+<p>More nonsense at <a href="http://automeme.net/">http://automeme.net/</a>.</p>
+<p>No-ASCII characters like <code>öäüß</code> are no problems as long as input files are
+encoded in UTF8.</p></div>
     </div>
     <div id="footer">
         Built with <a href="http://bitbucket.org/obensonne/poole">Poole</a>
 diff = p.communicate()[0]
 if diff:
     with codecs.open(ERRORS, 'w', 'UTF8') as fp:
-        fp.write(diff)
+        fp.write(diff.decode('UTF8'))
     print("failed - see %s for details" % ERRORS)
     sys.exit(1)