Re: Unification of filesystem encoding options

Jan Kara
2020-01-07T13:32:38Z

On Thu 02-01-20 22:18:55, Pali Rohár wrote:
> 1) Unify mount options for specifying charset.
>
> Currently all filesystems except msdos and hfsplus have mount option
> iocharset=<charset>. hfsplus has nls=<charset> and msdos does not
> implement re-encoding support. Plus vfat, udf and isofs have broken
> iocharset=utf8 option (but working utf8 option) And ntfs has deprecated
> iocharset=<charset> option.
>
> I would suggest following changes for unification:
>
> * Add a new alias iocharset= for hfsplus which would do same as nls=
> * Make iocharset=utf8 option for vfat, udf and isofs to do same as utf8
> * Un-deprecate iocharset=<charset> option for ntfs
>
> This would cause that all filesystems would have iocharset=<charset>
> option which would work for any charset, including iocharset=utf8.
> And it would fix also broken iocharset=utf8 for vfat, udf and isofs.

Makes sense to me.

> 2) Add support for Unicode code points above U+FFFF for filesystems
> befs, hfs, hfsplus, jfs and ntfs, so iocharset=utf8 option would work
> also with filenames in userspace which would be 4 bytes long UTF-8.

Also looks good but when doing this, I'd suggest we extend NLS to support
full UTF-8 rather than implementing it by hand like e.g. we did for UDF.

> 3) Add support for iocharset= and codepage= options for msdos
> filesystem. It shares lot of pars of code with vfat driver.

I guess this is for msdos filesystem maintainers to decide.

Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR