Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Target Management » RSE perspective: host properties default encoding(subsystem code page support)
RSE perspective: host properties default encoding [message #676793] Mon, 06 June 2011 14:38 Go to next message
Alex Pitigoi is currently offline Alex PitigoiFriend
Messages: 17
Registered: July 2009
Junior Member
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::getDefaultEncoding(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
Re: RSE perspective: host properties default encoding [message #676834 is a reply to message #676793] Mon, 06 June 2011 16:50 Go to previous message
David McKnight is currently offline David McKnightFriend
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
Previous Topic:How launch a terminal SSH in my RCP application
Next Topic:RSE (and also Aptana) uploads are forced to sub-folder
Goto Forum:
  


Current Time: Fri Apr 26 01:23:46 GMT 2024

Powered by FUDForum. Page generated in 5.03266 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top