#1651995: fix _convert_ref for non-ASCII characters.
diff --git a/Lib/test/test_sgmllib.py b/Lib/test/test_sgmllib.py
index 34fd7f0..081e0e1 100644
--- a/Lib/test/test_sgmllib.py
+++ b/Lib/test/test_sgmllib.py
@@ -373,6 +373,15 @@
             if len(data) != CHUNK:
                 break
 
+    def test_only_decode_ascii(self):
+        # SF bug #1651995, make sure non-ascii character references are not decoded
+        s = '<signs exclamation="&#33" copyright="&#169" quoteleft="&#8216;">'
+        self.check_events(s, [
+            ('starttag', 'signs',
+             [('exclamation', '!'), ('copyright', '&#169'),
+              ('quoteleft', '&#8216;')]),
+            ])
+
     # XXX These tests have been disabled by prefixing their names with
     # an underscore.  The first two exercise outstanding bugs in the
     # sgmllib module, and the third exhibits questionable behavior