While the extra `NUL`? And why the change in the first place? And why add the `{..}` when the code style clearly asks *not* to add curly brackets around single-line blocks?

And why repeat virtually the exact same hunk three times? Would that not strongly suggest that this handling desires nothing more than to be refactored, most likely into the `xutftowcs_path()` function itself?