exFAT volume label length: 11 or 15 characters?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Hypnotic Orient Looping
--
Chapters
00:00 Exfat Volume Label Length: 11 Or 15 Characters?
01:11 Accepted Answer Score 13
02:58 Thank you
--
Full question
https://superuser.com/questions/1206131/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windows7 #usbflashdrive #volumelabel
#avk47
ACCEPTED ANSWER
Score 13
exFAT stores the volume label in a special directory entry. The size of the entire entry is always 32 bytes, so both "file name" and "volume label" entries have 30 bytes of space for the text itself – that means 15 UCS-2 codepoints can be stored, technically. (Volume label is exactly one entry, while file names can span multiple.)
However, the exFAT 1.0 specification in US patent 20090164440 (page 21, table 23) says that the valid range of label length byte is between 0 and 11, and marks the remaining space of the directory entry as "reserved".
So my guess is that Microsoft decided to deliberately limit exFAT labels to the same size as FAT in order to reduce compatibility issues with other software, e.g. device firmwares which are difficult to update. (Perhaps another implementation tried to share code between FAT and exFAT, and long labels made it crash?)
(FAT stores volume labels in exactly the same manner, so it has a 11-byte limit due to using the 8.3 filename field.)
Meanwhile, exfat-utils either wasn't written exactly to the spec (perhaps parts of it were reverse-engineered) or just doesn't care about this issue, and makes full use of the available space.
So long labels are nonstandard, but probably safe to use – it is unlikely that those spare bytes will ever be reused for anything else, as Microsoft know that repurposing them would conflict with old 15-byte labels that people created in the past. If they allowed it in Win7, they have to support it for a long time.