Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 79252 Details for
Bug 204744
[ssh][encodings] Command view input does not honor specified encoding
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch fixing the issue
patch204744_sshShellEncodings.diff.txt (text/plain), 3.03 KB, created by
Martin Oberhuber
on 2007-09-26 19:04:00 EDT
(
hide
)
Description:
Patch fixing the issue
Filename:
MIME Type:
Creator:
Martin Oberhuber
Created:
2007-09-26 19:04:00 EDT
Size:
3.03 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.services.ssh >Index: src/org/eclipse/rse/internal/services/ssh/shell/SshHostShell.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/shell/SshHostShell.java,v >retrieving revision 1.5 >diff -u -r1.5 SshHostShell.java >--- src/org/eclipse/rse/internal/services/ssh/shell/SshHostShell.java 12 Jul 2007 13:34:59 -0000 1.5 >+++ src/org/eclipse/rse/internal/services/ssh/shell/SshHostShell.java 26 Sep 2007 23:03:30 -0000 >@@ -15,6 +15,7 @@ > * Martin Oberhuber (Wind River) - Adapted from LocalHostShell. > * David McKnight (IBM) - [191599] Use the remote encoding specified in the host property page > * David McKnight (IBM) - [196301] Check that the remote encoding isn't null before using it >+ * Martin Oberhuber (Wind River) - [204744] Honor encoding in SSH command input fieldshell commands > *******************************************************************************/ > > package org.eclipse.rse.internal.services.ssh.shell; >@@ -22,7 +23,9 @@ > import java.io.BufferedReader; > import java.io.InputStreamReader; > import java.io.OutputStream; >+import java.io.OutputStreamWriter; > import java.io.PrintWriter; >+import java.nio.charset.Charset; > import java.util.Hashtable; > import java.util.regex.Pattern; > >@@ -64,7 +67,7 @@ > // ((ChannelShell)fChannel).setPty(false); > //} > >- //Try to set the user envionment. On most sshd configurations, this will >+ //Try to set the user environment. On most sshd configurations, this will > //not work since in sshd_config, PermitUserEnvironment and AcceptEnv > //settings are disabled. Still, it's worth a try. > if (environment!=null && environment.length>0 && fChannel instanceof ChannelShell) { >@@ -92,13 +95,16 @@ > } > fStderrHandler = new SshShellOutputReader(this, null,true); > OutputStream outputStream = fChannel.getOutputStream(); >- //TODO check if encoding or command to execute needs to be considered >- //If a command is given, it might be possible to do without a Thread >- //Charset cs = Charset.forName(encoding); >- //PrintWriter outputWriter = new PrintWriter( >- // new BufferedWriter(new OutputStreamWriter(outputStream,cs))); >- PrintWriter outputWriter = new PrintWriter(outputStream); >- fShellWriter = new SshShellWriterThread(outputWriter); >+ if (encoding!=null) { >+ //use specified encoding >+ Charset cs = Charset.forName(encoding); >+ PrintWriter outputWriter = new PrintWriter( >+ new OutputStreamWriter(outputStream,cs)); >+ fShellWriter = new SshShellWriterThread(outputWriter); >+ } else { >+ PrintWriter outputWriter = new PrintWriter(outputStream); >+ fShellWriter = new SshShellWriterThread(outputWriter); >+ } > fChannel.connect(); > if (initialWorkingDirectory!=null && initialWorkingDirectory.length()>0 > && !initialWorkingDirectory.equals(".") //$NON-NLS-1$
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 204744
: 79252