objstr: Add str.encode() and bytes.decode() methods.

These largely duplicate str() & bytes() constructors' functionality,
but can be used to achieve Python2 compatibility.
diff --git a/py/makeqstrdata.py b/py/makeqstrdata.py
index 81b0035..0cc9ba1 100644
--- a/py/makeqstrdata.py
+++ b/py/makeqstrdata.py
@@ -10,6 +10,7 @@
     from htmlentitydefs import codepoint2name
 elif platform.python_version_tuple()[0] == '3':
     from html.entities import codepoint2name
+codepoint2name[ord('-')] = 'hyphen';
 
 # add some custom names to map characters that aren't in HTML
 codepoint2name[ord('.')] = 'dot'