Subject: Re: [nfsv4] Internationalization and rfc3530bis-29's section 5.10

From: Mike Kupfer <[email-masked]>
Date: Fri, 14 Feb 2014 14:15:25 -0800

Sorry for the very delayed response.  I looked at both ZFS and Solaris
pcfs, using a recent build of pre-release Solaris.  I don't expect pcfs
to be used much as the local filesystem on a server, but since it's
possible, I thought I'd mention it.

Noveck, David wrote:

> 1.  Do you know of NFSv4 servers (or server/filesystem pairs) that
> implement non-case-preserving behavior?  If so, does it up-case or
> down-case?  Also, does it deal with internationalization-related
> issues at all.

Solaris pcfs can be configured to down-case everything, though that's
not the default.  Based on Nico's test program, it apparently supports
case mapping for UTF-8 strings (by default).  I didn't investigate
normalization.

> 2.  Do you know of NFSv4 servers (or server/filesystem pairs) that
> implement case-insensitive lookups?

Yes: 
- Solaris/pcfs
- Solaris/ZFS (if configured to do case-insensitive lookups).

> 3.  Do you have clients that have actually interacted with either of
> these?

I'm not aware of any testing, other than what's reported below.

> For those who either know the internals of such a server or are able
> to test how it reacts currently:
> 
> 1.  Does it treat GREEK-SMALL-LETTER-FINAL-SIGMA as having an
> upper-case equivalent of GREEK-CAPITAL-LETTER-SIGMA?

ZFS: yes
pcfs (case-preserving): yes

> 2.  If so, and it is a non-case-preserving-implementation which
> down-cases, what is the lower-case equivalent of
> GREEK-CAPITAL-LETTER-SIGMA?  Is it context-dependent?

ZFS: N/A (ZFS preserves case)
pcfs: I didn't investigate pcfs in downcase mode

> 3.  How does it deal with the issue of dotted vs. dotless I in
> Turkish?  Is this configurable?

ZFS: LATIN CAPITAL LETTER I matches LATIN SMALL LETTER DOTLESS I

pcfs (case-preserving): LATIN CAPITAL LETTER I does *not* match LATIN
SMALL LETTER DOTLESS I

I'm not aware of any configuration option for this specific situation.

> 4.  How are OHM-SIGN and ANGSTROM-SIGN dealt with?  Are they treated
> as having no lower-case equivalents, as suggested by the current text
> (in the -29)?  Are they matched up with GREEK-SMALL-LETTER-OMEGA and
> LATIN-SMALL-LETTER-A-WITH-RING-ABOVE, as Unicode suggests?  Or
> something else?

I need to investigate this some more.  The results from Nico's test
program do not match what I would expect from reading the code.

mike

---

From: Nico Williams <[email-masked]>
Date: Fri, 14 Feb 2014 16:33:34 -0600

>> Turkish?  Is this configurable?

Normally "context dependence" / configurability of this sort of thing
is really done via locale choices.  In-kernel file servers and
filesystems tend not to have support for more than one locale.
FUSE-/Samba-type user-land filesystems can support more than one
locale, but making that choice vary in any way other than by
filesystem is clearly not desirable, and probably not at all possible
anyways, at least as far as case equivalence.

> I'm not aware of any configuration option for this specific situation.

I'm not either, but you could implement a per-filesystem (or perhaps
even per-directory, though I'd not recommend it) option for this.

> program do not match what I would expect from reading the code.

The case mapping code that's in Illumos is compiled from tables whose
originals are not included in Illumos (because they weren't included
in OpenSolaris).  The comments in the source claim that the tables and
compiler are archived in a PSARC case.  I don't recommend trying to
decompile the tables in the source tree, though in principle it should
be possible -- you can access that PSARC case and see the original
tables.

Nico
--