[Bug 26888] Wine limits file names to 255 bytes even on NTFS

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Apr 23 09:03:24 CDT 2011


--- Comment #5 from Jussi Judin <jjudin+wine at iki.fi> 2011-04-23 09:03:23 CDT ---
Let's try this without that one character that breaks bugzilla:

(In reply to comment #3)
> Neither Wine nor NTFS internally store file names in multibyte encodings,
> so you probably got misguided somewhere.

Wine doesn't clearly take multibyte characters into account but imposes a limit
that clearly comes from the file name length in bytes, not in something that is
imposed by file system. But claiming that NTFS doesn't take multibyte encodings
into account is completely wrong as Wikipedia
(https://secure.wikimedia.org/wikipedia/en/wiki/NTFS) states that NTFS limits
its file length to 255 UTF-16 code units, 1 code unit is 2 bytes => 510 bytes
(some of the 1 code unit characters can result in 3 byte strings with UTF-8
encoding). This usually results 255 character limit but if you use characters
that don't fit into basic multilingual plane, like \U103A0, then you are
limited to less characters as now one character takes 2 UTF-16 code units to

You can test everything I have said to confirm yourself if you are doubtful
with the commands I have given to create a NTFS files system, mount it with
NTFS-3G and to create files from your favorite shell that will result in file
names that are over 255 bytes when they are UTF-8 encoded but they still hold
under 255 characters and therefore work. You can also run these commands inside
Windows cmd (these characters will look like question marks but you can use
explorer to confirm that the correct file has been created), any unix shell or
inside Wine cmd and see that if executed on NTFS file system, Wine cmd will
fail and other shells will succeed. Or use any other program that can create
files and be run through Wine (like Notepad++).

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list