#515: add check for non-ascii-chars, fix sources and tests