nvi does not use the correct call to read wide characters from a file. I have patched it and submitted the patch upstream and told the author that I would also submit the patch to the gentoo developers.
Created attachment 98842 [details, diff] patch to fix unicode read in nvi I have tried this patch against both the stable version and the soon to be released eselect version of nvi. It works for me.
While that patch seems sane to me, could you give a quick example of when it is necessary? (I can use nvi to edit my UTF-8 encoded files, without problems yet.)
Create a file containing utf-8 characters. Save it. Bring up nvi and then load that file in via :r file. The utf-8 will be garbled.
Thanks, fixed in 1.81.5-r5. I know that's in package.mask, but eselect-vi is supposed to be unmasked soon. If it's not, I'll add another non-eselect revision as well.
Perfect. Thanks.