|Re: RSE perspective: host properties default encoding [message #676834 is a reply to message #676793]
||Mon, 06 June 2011 16:50
| David McKnight
Registered: July 2009
The default encoding for the Host is based on property values that can be
set in the associated ENCODING_PROPERTY_SET for the host. There are
actually two properties involved here:
These get set when IHost.setDefaultEncoding(encoding, fromRemote) is called.
The first of these is set when fromRemote is false, and the second is set
when fromRemote is true. If the user sets the encoding via the connection
property page, then the non-remote one will be set. Depending on the
subsystems and services that are associated with a given IHost, the remote
encoding may get set. For example, if the non-remote encoding for a host
has not been set, FileServiceSubSystem.getRemoteEncoding() will set the
default remote encoding to what it's service determines it to be. In the
case of dstore, the encoding is determined remotely, while, for other
services, like SSH, I believe we don't get anything from the host for this.
For SSH, I'm not sure whether there's an API available for this - if there
is then it would be a matter of overriding AbstractFileService.getEncoding()
to use that. It may be worthwhile opening a bugzilla for that.
"Alex Pitigoi" <firstname.lastname@example.org> wrote in message
> Is the "Default from remote server" encoding property on the Host
> properties page expected to retrieve the code page on the server as the
> API defines it ?
> We noticed on test servers configured for simplified Chinese code page
> CP936, unless we specifically choose this code page ("Other" radio
> button), the "Default from remote server" does not seem to retrieve the
> "default remote from server".
> If the server is Windows (running a Cygwin OpenSSH) does the retrieval of
> the code page involve the chcp Windows API ?
> Any hint or advice is much appreciated.
Powered by FUDForum
. Page generated in 0.01732 seconds