take care of utf-8 when cutting filename