Raise exception when illegal character is found: fixes #385