scanner: add tests for possibly ambiguous characters