add encoding setting for path.