Re: [PATCH V2] hfsplus: fixes worst-case unicode to char conversion of file names and attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8 April 2014 04:19, Hin-Tak Leung <hintak.leung@xxxxxxxxx> wrote:

> Strictly speaking, the maximum value of NLS_MAX_CHARSET_SIZE = 6
> is not attainable in the case of conversion to UTF-8, as that
> requires the use of surrogate pairs, i.e. consuming two storage units.

True that 6 is not attainable, wrong that it is with surrogate pairs.
A surrogate pair encodes code-points from U+10000 to U+10FFFF, which
is 4 bytes in UTF-8 (a moderate 2 per one UTF-16 code-unit).

Multiplier 3 is enough for all cases of UTF-16/UCS-2 to UTF-8 conversion.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux