Adjust the heuristics to recognize more cases of unknown glyphs for |toUnicode| (issue 5070)

Fixes #5070.
Could you assign it to `0` or `null`?