tolerance of non-ascii characters

fix for #96/#97 (but not #155 which is a bit more involved)