Re: [JSch-users] Jsch ChannelSftp and character encodings
Status: Alpha
Brought to you by:
ymnk
From: Oberhuber, M. <Mar...@wi...> - 2007-09-28 19:45:24
|
> By the way, I have not heard the answer to my question, > > If that method is added, are you really planning to use it=20 > > in your product? Yes, absolutely, sorry for not being clear about that. Our product requires that the user is able to manually specify the encoding to be used for remote file and=20 directory names, and I think that overriding the encoding in Jsch is the only way to do this with SSH connections. > Are you planning to enable and disable that functionality > according to Session#getServerVersion() and > keep and update the database for it internally, forever? Hm, that's a good question, I'm not sure. I guess I'd probably not keep such a database, and use "UTF-8" as the encoding to use by default; so users would override it only if they see=20 strange unwanted effects. Basically, not put in any magic=20 but have the user manually specify the encoding if they=20 don't like the results they have with UTF-8. I might want to check remote environment variables to understand the remote default encoding at some point in=20 the future. I could also imagine some kind of check, e.g. create a file with non-UTF8 encoding through Sftp and then read the result through a shell. I should be able to discover whether the server recodes or not. Honestly speaking, I'm not the expert about that stuff but we've had bug reports from Hebrew people who say that it is equally common in their country to have UTF-8 encodign or ASCII-based encoding on their hosts (50% each). Similar in Russia. See, for instance https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D179937#c7 Cheers, -- Martin Oberhuber Wind River Systems, Inc. Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm=20 |