merge multibyte path handling from dkw72n