On Mon, Dec 23, 2019 at 02:41:13AM +0000, Conrad Meyer wrote:
> Author: cem
> Date: Mon Dec 23 02:41:13 2019
> New Revision: 356032
> URL: https://svnweb.freebsd.org/changeset/base/356032
> 
> Log:
>   fstyp(8): Use iconv(3) to convert NTFS vol labels correctly
>   
>   Rather than hackily extracting only the ASCII subset of UTF-16LE, go ahead
>   and convert the label to the user's locale correctly.
> Modified:
>   head/usr.sbin/fstyp/fstyp.c
>   head/usr.sbin/fstyp/fstyp.h
>   head/usr.sbin/fstyp/ntfs.c
> 

Good! The code was part of in-kernel glabel(4) code.
We may convert the code by iconv(9), but iconv(9) requires userland support
and not available on boot time, AFAIK.
So I wrote crude ASCII subset convertion.

Today, UTF-8 based locale is largely accepted. So in-kernel side of the code
may covert fixed UTF-8, assuming devfs encoding as UTF-8.

_______________________________________________
freebsd-geom@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "freebsd-geom-unsubscr...@freebsd.org"

Reply via email to