Replace some of the more potentially troublesome ctype function calls
Merge remote-tracking branch 'upstream/refactor-syntax_unicode' into refactor-syntax_unicode