Subject: Re: SFTP character encoding and problem with agent auth

Re: SFTP character encoding and problem with agent auth

From: Alexander Lamaison <>
Date: Fri, 13 Aug 2010 21:12:40 +0100

2010/8/13 Željko Marjanović <>:
> Thank you for your detailed reply. Much appreciated :-)

My pleasure.

> I had another idea how to get the encoding the server is using, dunno if it's good enough :-)
> The idea was to open the ssh channel and read the LANG/LC_ALL env variables if they exist,
> parse them and set the encoding; if they don’t exist revert to default.

This may be a reasonable heuristic much of the time but I can imagine
situations where it wouldn't work. Firstly, I don't know if it's a
requirement for all Unices to define the environment variable.
Certainly non-unix OSes don't have to. Also, I described the way it
is interpreted by modern Linux, particularly Ubuntu. I can't promise
you that all Unices interpret it uniformly. I can imagine flavours of
Unix that don't have localisation support that assume all filenames
are encoded in a particular, non-UTF-8 encoding and don't even bother
with LANG. In general, only the user can really know.


P.S. Please _always_ bottom-post on this list otherwise conversations
get incredibly confusing.

Swish - Easy SFTP for Windows Explorer (
Received on 2010-08-13