Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Dec 2019 13:18:43 +0900
From:      Takanori Watanabe <takawata@init-main.com>
To:        Conrad Meyer <cem@freebsd.org>
Cc:        freebsd-geom@freebsd.org, freebsd-fs@freebsd.org
Subject:   Re: svn commit: r356032 - head/usr.sbin/fstyp
Message-ID:  <20191223041843.GA10764@sana.init-main.com>
In-Reply-To: <201912230241.xBN2fDte091985@repo.freebsd.org>
References:  <201912230241.xBN2fDte091985@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191223041843.GA10764>