IETF-SSH archive

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

Re: SFTP and unicode file names...



Joseph Galbraith <galb-list%vandyke.com@localhost> writes:

> Here are some possibilities:
> 
> 1. Let the server say what it is going to use,
>     UTF-8 or 'undefined-raw' at the beginning
>     of the sftp session.
> 
>     pro: simple.  really simple.
>     con: Doesn't address cases where the server
>          might be able to do utf-8 for some file
>          systems (ext-3 under fedora, I think is
>          one example) but not others.

I'd much prefer the simple way. Just let the server say what character
set it uses, and do no conversions at the server end (a server that
really knows what it is doing MAY handle a file system with mixed
character sets by converting them to and from utf-8, and use utf-8
exclusively on the wire, but I don't think that is very practical).
Some possible values are "unknown", "usascii", "iso-8859-1", "utf-8",
and "utf-8-with-normalization-form-c".

(Note that utf-8 with undefined normalization is suboptimal for
filenames and for identifiers in general).

This approach should work fine for systems that uses utf-8
consistently in the filesystem (I think windows-ce does that, not sure
about more regular windows versions).

I think the typical unix filesystem uses usascii for all "system
files", and then has some home directories with iso-8859-x names, some
with utf-8 names, which all include usascii. (I admit that I don't
have any experience with asian unix installations). Then it will work
reasonably to set the advertised charset from the user's $LC_CTYPE.

There will naturally be some difficulties if different parts of the
filesystem tree uses different character sets, or if there are single
pathnames that use components (directory names) with different
character sets. However, those difficulties are precisely the same
with *local* access to the file system, so it makes absolutely no
sense to try to solve them in the sftp spec.

Best regards,
/Niels



Home | Main Index | Thread Index | Old Index