handle unicode characters in pattern path