encode path as utf-8