Skip to contentSkip to conversation

Long file names in VFAT broken with iocharset=utf8

DISCUSSION Bodo Eggert 3 participants 4 messages May 8, 2007 – May 10, 2007 5 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Albert Cahalan <[email protected]> wrote:

[...]

Quoted 10 lines

At two bytes per character, you get 127 characters in a filename. That's wider than the standard 80-column display, and far wider than the 28 or 29 characters that an "ls -l" has room for. In a GUI file manager or file dialog box, you'll have to scroll sideways. In a web browser directory listing, you'll almost certainly have to scroll sideways. Must of this even applies to Windows tools.

In other words, this is user error. Somebody thought that a filename was a place to store a document, probably a README file. What next, shall we MIME-encode an icon into the filename?

I've got a music file where the artist name is 113 characters long, if I use an abbreviation.

Quoted 1 line

Fix: the vfat driver should use the 8.3 name for such files.

Let's port that to ext3! I wantet the system to rename my files into abcd~123.ext for all my life! NOT!

Signature · 4 lines
If at first you don't succeed call in an air-strike. 

Friß, Spammer: [email protected] [email protected]
 [email protected] [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 8 lines · Albert Cahalan
Quoted 1 line · Andrey Borzenkov

3. this still does not answer how can I *create* long name from within Linux.

WTF? These names are too annoying to use, even if there weren't this limit. Anything over about 29 characters is in need of a rename. (that'd be 58 bytes for you, which is OK) The limit is already 4 times larger than what is reasonable.

Just because you limit yourself to 80 chars minus "ls -l"-clutter, this is no reason why I shouldn't use long filenames. If I need to handle these filenames, I can enlarge the terminal window or read the next line.

E.g.: I have a music file named "artist - title.ext", where the artist name is 103 characters long, using abbreviations. In order to enter that name, I have to press seven keys, including the escape character. There is nothing unreasonable in using that name.

If I could not use these filenames, I'd have to use e.g. numbers instead of filenames and a database containing the mapping from name to number, duplicating the function of a directory. That's bullsh... . You should rather bump NAME_MAX and, if you are concerned about legacy applications, make it optional. Having some names to be illegal becaue of their length on a filesystem not allowing command.com metacharacters is not a problem.

Signature · 4 lines
Funny quotes:
3. On the other hand, you have different fingers.

Friß, Spammer: [email protected] [email protected]
#7 lore raw
Quoted 9 lines · Bodo Eggert

Just because you limit yourself to 80 chars minus "ls -l"-clutter, this is no reason why I shouldn't use long filenames. If I need to handle these filenames, I can enlarge the terminal window or read the next line.

E.g.: I have a music file named "artist - title.ext", where the artist name is 103 characters long, using abbreviations. In order to enter that name, I have to press seven keys, including the escape character. There is nothing unreasonable in using that name.

What name would that be? I cannot dream up any IME that outputs _that_ many characters for that few keystrokes. Even with CJ(K), 7 keystrokes can make at most 21 bytes if I had to take a good guess.

Jan

#8 lore raw
Quoted 4 lines
Quoted 4 lines

Just because you limit yourself to 80 chars minus "ls -l"-clutter, this is no reason why I shouldn't use long filenames. If I need to handle these filenames, I can enlarge the terminal window or read the next line.

Quoted 8 lines
Quoted 4 lines

E.g.: I have a music file named "artist - title.ext", where the artist name is 103 characters long, using abbreviations. In order to enter that name, I have to press seven keys, including the escape character. There is nothing unreasonable in using that name.

What name would that be? I cannot dream up any IME that outputs _that_ many characters for that few keystrokes. Even with CJ(K), 7 keystrokes can make at most 21 bytes if I had to take a good guess.

Probably talking about tab-completion in the shell, countering the comment that names that long are too unwieldy to use.

On the other hand, limits are always bad. Haven't we seen bajillions of cases in computing history where we start with limits (like only N of the first characters of identifiers used in compilers), followed by people finding those limits annoying, then followed by the limits being removed? How about the Year-20?? limitations? Same thing: limits that were fine, then limits were not fine, then limits were removed.

In this era, couldn't we just skip the whole thing and stop putting limits in from the beginning? The only reason to have a PATH_MAX/NAME_MAX at all is to make life easier for programmers implementing things and people using things. It would require a LOT of work and changes, but life would be so much better if there were a (configurable, of course!) option to say "use standard values" or "use custom values" or "use runtime-dynamic values". Option 1: No change. Option 2: Alter your limits.h too, and recompile programs (or fix them). Option 3: Change programs from compile-time inclusion of limits.h to run-time checking of a /sys value.