fixed non-ascii characters handling