fix utf-8

 issue #3399
 tested!