mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
[191599] use shell encoding specified
This commit is contained in:
parent
2d19b83970
commit
2a18d44c77
2 changed files with 10 additions and 2 deletions
|
@ -12,7 +12,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* David McKnight (IBM) - [191599] use specified encoding for shell
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.dstore.universal.miners;
|
package org.eclipse.rse.dstore.universal.miners;
|
||||||
|
@ -189,6 +189,12 @@ public class CommandMiner extends Miner
|
||||||
else if (name.equals("C_SHELL")) //$NON-NLS-1$
|
else if (name.equals("C_SHELL")) //$NON-NLS-1$
|
||||||
{
|
{
|
||||||
String invocation = ">"; //$NON-NLS-1$
|
String invocation = ">"; //$NON-NLS-1$
|
||||||
|
DataElement encodingArg = getCommandArgument(theElement, 1);
|
||||||
|
if (encodingArg.getType().equals("shell.encoding"))
|
||||||
|
{
|
||||||
|
// fix for 191599
|
||||||
|
System.setProperty("dstore.stdin.encoding",encodingArg.getValue()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
launchCommand(subject, invocation, status);
|
launchCommand(subject, invocation, status);
|
||||||
}
|
}
|
||||||
else if (name.equals("C_SEND_INPUT")) //$NON-NLS-1$
|
else if (name.equals("C_SEND_INPUT")) //$NON-NLS-1$
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||||
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
|
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
|
||||||
|
* David McKnight (IBM) - [191599] Need to pass in shell encoding
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
|
package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
|
||||||
|
@ -141,7 +142,8 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I
|
||||||
|
|
||||||
|
|
||||||
IShellService service = getShellService();
|
IShellService service = getShellService();
|
||||||
IHostShell hostShell = service.launchShell(cwd, getUserAndHostEnvVarsAsStringArray(), monitor);
|
String encoding = getHost().getDefaultEncoding(true);
|
||||||
|
IHostShell hostShell = service.launchShell(cwd, encoding, getUserAndHostEnvVarsAsStringArray(), monitor);
|
||||||
IServiceCommandShell cmdShell = createRemoteCommandShell(this, hostShell);
|
IServiceCommandShell cmdShell = createRemoteCommandShell(this, hostShell);
|
||||||
if (cmdShell != null)
|
if (cmdShell != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue