bugfixes

- fix: non-ASCII input fed as signed char into ctype functions such as
isdigit() causes undefined behavior
- fix: the cast is not recognized as such in 'sizeof((int) + 1)'