Added support for non-latin characters, fixes Bug #515