Re: extending the maximum filename length (pointer to patch)[request for input]

From: Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp>
Date: Sat, 16 Sep 2017 13:07:46 +0900
On Tue, 12 Sep 2017 14:46:12 -0230
"Jonathan Anderson" <jonathan_at_FreeBSD.org> wrote:

> On 12 Sep 2017, at 14:38, Julian Elischer wrote:
> 
> > $B!H"._at_'0lP$".".B?;zIdJ87oL>".EYE*J87oL\E*_at_'L?L>0lP$J87oMQCfJ80?<TF|J80?<T".J8;zIdVu3nMW5a;zId".EYD6".H,==8^P$;zIdA39!9i".".J87oE~2f".E*6&5}J87o".4G4G_at_'H]G=".9i".".J87oE~2f(B.txt$B!I(B
> > (I have no idea what that says but apparently it's a real filename 
> > from a windows machine that blew up when written via samba.)
> 
> Google Translate says, amusingly:
> "This is a test file for the length of the file name. The purpose is to 
> name a file in Chinese or Japanese or Korean characters and require the 
> character to be longer than 85 characters and then copy the file into 
> our shared folder to see if it can copy the file To me" (.txt, I guess)
> 
> No matter what number you choose for a path length, you're never going 
> to win against that specific user. :)

Most people who doesn't know the "internals" would not matter how
long "a character" is. So we'd better assuming the longest-possible
character.

At worst, file name string can contain shift-in / shift-out or
charset change sequences, and become much longer (character sets
specific). But if we decide the "filename standard" as UTF-8, it
wouldn't be needed and 4 (6?) bytes/character would be sufficient.

So if we decide max length on "UTF-8 characters" to be 256, 1536
"bytes" would be sufficient.

*Possibly 5 and 6 bytes character in UTF-8 could be already prohibited.
 If so, 1024 bytes is sufficient.

> 
> 
> Jon
> --
> Jonathan Anderson
> jonathan_at_FreeBSD.org
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
> 
> 


-- 
Tomoaki AOKI    <junchoon_at_dec.sakura.ne.jp>
Received on Sat Sep 16 2017 - 02:07:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:13 UTC