|
Re: RSE perspective: host properties default encoding [message #676834 is a reply to message #676793] |
Mon, 06 June 2011 16:50 |
David McKnight Messages: 244 Registered: July 2009 |
Senior Member |
|
|
Hi Alex,
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:
ENCODING_NON_REMOTE_PROPERTY_KEY and
ENCODING_REMOTE_PROPERTY_KEY
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.
Dave
"Alex Pitigoi" <forums-noreply@eclipse.org> wrote in message
news:isio81$82c$1@news.eclipse.org...
> Is the "Default from remote server" encoding property on the Host
> properties page expected to retrieve the code page on the server as the
> org.eclipse.rse.core.model.IHost::http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.rse.doc.isv/reference/api/org/eclipse/rse/core/model/IHost.html(true)
> 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.
> Thanks,
> Alex
|
|
|
Powered by
FUDForum. Page generated in 5.03266 seconds