Changes between Version 2 and Version 3 of Ticket #22363, comment 32
- Timestamp:
- 11/16/2013 05:00:05 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #22363, comment 32
v2 v3 2 2 3 3 1. As for filenames: 4 - Non-ASCII filenames will break on Windows. This is fundamentally a PHP bug.4 - Non-ASCII filenames will break on Windows. This has to do with how PHP interacts with the Windows file system. There might be a workaround that allows filenames to contain characters contained on the current "code page", but other characters will break filenames. 5 5 - *nix filesystems allow any characters in filenames (minus the reserved characters, of course). 6 6 - WordPress allows uploaded files to have any characters in their names (minus some reserved characters). 7 7 - UTF-8 filenames work OK on WordPress on a *nix platform. 8 - Percent-encodedfilenames work on any platform, but make the filename 6 times longer in certain scripts, such as Cyrillic ('%D0%B6' for the character 'ж', for example).9 - The maximum file name length under NTFS is 259 characters including the path. 410 - Percent-encoded filenames are not a solution. <img src='ca%C3%B1o.jpg'/> will 404 even though the file 'ca%C3%B1o.jpg' exists, since the server decodes the request to 'caño.jpg'.8 - URL-encoded (percent-encoded) filenames work on any platform, but make the filename 6 times longer in certain scripts, such as Cyrillic ('%D0%B6' for the character 'ж', for example). 9 - The maximum file name length under NTFS is 259 characters including the path. 10 - URL-encoded filenames are not a solution. <img src='ca%C3%B1o.jpg'/> will 404 even though the file 'ca%C3%B1o.jpg' exists, since the server decodes the request to 'caño.jpg'. 11 11 - remove_accents() is only a partial solution since 1) it has no support at all for non-Latin based scripts and 2) it doesn't do anything with such things as curly quotes, dashes, copyright symbols or other similar things (which are included in sanitize_title_with_dashes()) 12 - sanitize_title() as such is no good for filenames, since it URL-encodes the non-ASCII parts. 12 13 13 14 2. As for URLs: