On Thursday 18 February 2010 19:46:05 Matthew Toseland wrote: > > > we can at least try to avoid making the problem any worse. > > > > I agree that we need re-inserts to work. It was one of my goals with the > > new sanitizer: The old one removed very common characters such as > > brackets. And as it is only being used when downloading files and not > > when inserting them, people who have downloaded an affected file could > > not reinsert it without renaming (which nobody will do). > > > > However, we cannot have a strict list of forbidden characters which is > > applied for all operating systems because some OS forbid very common and > > useful characters: Windows for example does not allow the question mark > > "?" in filenames. This sucks. What would be acceptable is to have a > > config option "Remove problematic characters from filenames when > > downloading and uploading files" and have it enabled by default. This > > should as the name says also change the current behavior to also sanitize > > filenames before uploading. > > As I understand it your code does not remove : ? etc on Windows, it only > removes stuff that cannot be represented in ISO-8859-1 or UTF-8 or whatever > the default is.
Of course it does:
"if(onWindowsOS &&
StringValidityChecker.isWindowsReservedFilenameCharacter(c))
sb.append(' ');"
(windowsReservedFilenameCharacters = new HashSet<Character>(Arrays.asList(
new Character[] { '/', '\\', '?', '%', '*', ':', '|',
'\"', '<', '>'}));
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Devl mailing list [email protected] http://osprey.vm.bytemark.co.uk/cgi-bin/mailman/listinfo/devl
