#515: add check for non-ascii-chars, fix sources and tests
Merge pull request #518 from mimmi20/issue-515

Fixes #515