Subj : Problem with filenames containing spaces
To   : Rob Swindell
From : Oli
Date : Fri Jan 21 2022 09:17 pm

Rob wrote (2022-01-20):

>>>> And it's only a problem with filenames that contains a whitespace
>>>> character.
RS>>> It's also a problem for filenames that contain any other "unsafe"
RS>>> characters that "SHOULD" (according to FTS-1026) be escaped.

>> You mean like 0x00 to 0x1F (control chars) and backslash (0x53)? How
>> often do you use these in filenames? ;)

RS> Preferably, never, but I'm not in control of what characters are used in
RS> filenames received BinkP, the sender is.

I wanted to express that in practice other (binkp-) reserved characters than whitespace are rarely used in filenames.

RS> Ideally, the BinkP spec would have been even *more* restrictive in the
RS> filename characters allowed (escaped or not), because filenames with
RS> colons, semicolons, asterisks, question marks and vertical-bars (pipes)
RS> are *not* what I would call "safe", yet they're expressly allowed as
RS> "safe" in the spec. :-(

I think "safe" means safe in relation to the protocol, not filenames. Most unix filesystems do allow any character except "/" and \0. (https://en.wikipedia.org/wiki/Filename#Comparison_of_filename_limitations)

The protocol should be agnostic to filename restrictions of different filesystems. It should not modify filenames and transmit them transparently. The receiving system can then decide how to store them and which characters should be escaped or changed. Other protocols like HTTP or SFTP do the same.

How forbidden characters would be saved should have been specified in FTS-5005 (Advanced BinkleyTerm Style Outbound flow and control) though.

It was a bit stupid to remove the UTF8 extensions from the binkp spec. What happens to character >127 in filenames (and other strings) is undefined.

I also wonder why control characters have to be escaped in a binary protocol. And why whitespace was chosen as a delimiter. They could have used \0 and disallow \0 in strings. Then there wouldn't be any need for escapology. (Or instead of using a delimiter between parameters make everything (type-) length-value).

But it is what it is.

* Origin: Birds aren't real (2:280/464.47)