Page 1 of 1

Special characters in attachment filenames

Posted: Mon Feb 04, 2013 10:13 am
by macula
Hi Jon,

In order to produce a valid filename, the "rename attachment" facility in Bookends filters out the colon (:) and replaces it with the hyphen (-). For example, a string such as:

Code: Select all

A title: A subtitle
would be converted to a filename such as:

Code: Select all

A title-A subtitle.pdf
May I ask that you consider filtering out the backslash (\), as well? Although the MacOS filesystem permits the backslash in filenames, Dropbox refuses to sync any such files, probably because they would be invalid in Windoze filesystems. (Curiously, though, Dropbox does sync filenames with other "problem" characters, e.g. the question mark.)

A comparative survey of filename rules across OSs appears at http://support.grouplogic.com/?p=1607. According to this source:
The following characters are invalid as file or folder names on Windows using NTFS:
/ ? < > \ : * | ” and any character you can type with the Ctrl key

In addition to the above illegal characters the caret ^ is also not permitted under Windows Operating Systems using the FAT file system.
I do not know how Dropbox fares with cross-platform filename synchronization in every case, but the backslash certainly causes problems.

Thank you.

Re: Special characters in attachment filenames

Posted: Mon Feb 04, 2013 10:54 am
by Jon
Hm, that is odd. Have you contacted DropBox tech support to see if this is intentional, or a bug?

Jon
Sonny Software

Re: Special characters in attachment filenames

Posted: Mon Feb 04, 2013 11:17 am
by macula
No I haven't, and Dropbox support is not nearly as speedy as Bookends Support, I'm afraid.

It certainly boils down to the backslash in the filename though, because:

1. Removing the contentious character from the filename instantly resolves the issue, and restoring the character instantly reproduces the issue.
2. Removing the extended attributes of the attachment (using xattr) does nothing to solve the issue, so we can eliminate the possibility of permissions issues etc.

Bug or not, how about just filtering out the backslash? It is quite an uncommon character to have in an attachment filename, anyway. The only reason it appears frequently in my database is that my attachments are automatically named after their title, and many of the titles contain backslash-prefixed LaTeX commands (e.g. \mkemph{…}).

Re: Special characters in attachment filenames

Posted: Mon Feb 04, 2013 11:20 am
by Jon
Taking out the backslash isn't hard of course, but I'm loathe to remove all the characters mentioned, especially because they are useful characters in many file names. I'm surprised that they worked for you but the backslash didn't (which is why I think it might be a bug). I'll filter out backslash in the future, but I'd like to stop there.

Jon
Sonny Software

Re: Special characters in attachment filenames

Posted: Mon Feb 04, 2013 11:33 am
by macula
Thanks, Jon, I'll be looking forward to the update. I agree that removing all other contentious characters would be overkill.

Re: Special characters in attachment filenames

Posted: Tue Feb 05, 2013 5:22 am
by macula
UPDATE: My request for more information on the Dropbox forums (not the official Dropbox support, yet many Dropbox developers hang out there) did not yield anything useful. None of the responders could explain the behavior, so this could indeed be a bug.

Re: Special characters in attachment filenames

Posted: Sat Dec 27, 2014 9:52 pm
by Nhaps
Is it possible to have BE replace the colon (:) with period (.) plus space rather than hyphen (-)? I am wondering how to go about making this change

Re: Special characters in attachment filenames

Posted: Sun Dec 28, 2014 9:38 am
by Jon
In the formatter? No, that's not possible. You'd have to do that yourself (find/replace) in the database.

Jon
Sonny Software