IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: SFTP File open modes



How many well-known and often utilized ways of encoding ASCII text files
are there (answer: two)? Is an ASCII mode as you suggest likely to be
useful? Or do we want a mode for UTF-8 and UTF-16, EBCEDIC, and so on?

Perhaps it would be best to add an operation by which the client can ask
the server for a given file's content type and encoding. The server's
response should indicate whether it knows, whether it knows for certain
and, if it knows at all, what the content type is.

All encoding conversions though should be left to the client though.

* First, one should distingush between a literal _ASCII_ mode, and a
_text_ mode.

The most specific proposal posted suggested using Latin-1 as a
least-common-denominator wire encoding, with a bunch of negotiated
alternatives. In this day and age, I think it would make more sense
to use something like UTF-8 (further spectified to reduce ambiguties).

I count at least three widely-used ways of encoding end-of-lines with
characters (CR,LF, CRLF) plus fixed-length records, plus counted
varable-length records: I don't know what you are thinking of in
saying "two".

* Text mode is a big win in the case of an OS which has files in some
well-known but ideosyncratic format, because the clients don't have
to say, know all the varients of EBCDIC or VMS record formats, just a
single wire format.

* But I think you've got a point that a server may not _know_ the
encoding of files, or may not want to support the overhead of a text
mode.

I don't know any foolproof way to detect which files in my Mac are in
Mac-extended-ASCII, which are in Latin1, and which are in Shift-JIS
(because I've been running the Japaneses language kit on on of my
Macs for years). The Mac type/creator scheme is more or less
orthogonal to i18n issues.

So this isn't something we should expect to be able to implement on
every server, or for every file.
--
    Albert Lunde         Albert-Lunde%northwestern.edu@localhost (new address)
                         Albert-Lunde%nwu.edu@localhost (old address)



Home | Main Index | Thread Index | Old Index