#3077: fix h2py substitution of character literals.
diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py
index f3c80bd..45aa439 100755
--- a/Tools/scripts/h2py.py
+++ b/Tools/scripts/h2py.py
@@ -87,7 +87,7 @@
     for p in ignores:
         body = p.sub(' ', body)
     # replace char literals by ord(...)
-    body = p_char.sub('ord(\\0)', body)
+    body = p_char.sub("ord('\\1')", body)
     # Compute negative hexadecimal constants
     start = 0
     UMAX = 2*(sys.maxsize+1)