#3092: fix unicode size detection in pybench
diff --git a/Tools/pybench/pybench.py b/Tools/pybench/pybench.py
index 771d7ac..4c5ea26 100755
--- a/Tools/pybench/pybench.py
+++ b/Tools/pybench/pybench.py
@@ -106,9 +106,7 @@
         print('Getting machine details...')
     buildno, builddate = platform.python_build()
     python = platform.python_version()
-    try:
-        chr(100000)
-    except ValueError:
+    if sys.maxunicode == 65535:
         # UCS2 build (standard)
         unitype = 'UCS2'
     else: