View | Details | Raw Unified | Return to bug 229610 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java (-3 / +5 lines)
Lines 52-57 Link Here
52
 * David McKnight   (IBM)        - [224377] "open with" menu does not have "other" option
52
 * David McKnight   (IBM)        - [224377] "open with" menu does not have "other" option
53
 * David McKnight (IBM) 		 - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
53
 * David McKnight (IBM) 		 - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
54
 * Rupen Mardirossian (IBM)      - [198728] Folder being copied across systems is added to original set of files in order to extract empty (sub)folders in doDrop method			
54
 * Rupen Mardirossian (IBM)      - [198728] Folder being copied across systems is added to original set of files in order to extract empty (sub)folders in doDrop method			
55
 * David McKnight     (IBM)      - [229610] [api] File transfers should use workspace text file encoding
55
 *******************************************************************************/
56
 *******************************************************************************/
56
57
57
package org.eclipse.rse.internal.files.ui.view;
58
package org.eclipse.rse.internal.files.ui.view;
Lines 2569-2577 Link Here
2569
						}
2570
						}
2570
						else
2571
						else
2571
						{
2572
						{
2572
2573
							// Not sure how we can get here since if the source and target subsystems are different, then a doDrag() needs to 
2573
							//System.out.println("how do we get here!??");
2574
							// occur, resulting in a local resource (i.e. IFile) rather than a remote resource (i.e. IRemoteFile).
2574
2575
							// TODO investigate to see if we can get rid of this code
2575
							if (srcFileOrFolder.isFile())
2576
							if (srcFileOrFolder.isFile())
2576
							{
2577
							{
2577
								try
2578
								try
Lines 2597-2602 Link Here
2597
									String newPath = newPathBuf.toString();
2598
									String newPath = newPathBuf.toString();
2598
2599
2599
									monitor.subTask(copyMessage.getLevelOneText());
2600
									monitor.subTask(copyMessage.getLevelOneText());
2601
									
2600
									targetFS.upload(srcFileOrFolder.getAbsolutePath(), SystemEncodingUtil.ENCODING_UTF_8, newPath, System.getProperty("file.encoding"), monitor); //$NON-NLS-1$
2602
									targetFS.upload(srcFileOrFolder.getAbsolutePath(), SystemEncodingUtil.ENCODING_UTF_8, newPath, System.getProperty("file.encoding"), monitor); //$NON-NLS-1$
2601
2603
2602
									result = targetFS.getRemoteFileObject(targetFolder, name, monitor);
2604
									result = targetFS.getRemoteFileObject(targetFolder, name, monitor);
(-)src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java (-3 / +5 lines)
Lines 45-50 Link Here
45
 * Rupen Mardirossian (IBM)      - [210682] Collisions when doing a copy operation across systems will us the SystemCopyDialog
45
 * Rupen Mardirossian (IBM)      - [210682] Collisions when doing a copy operation across systems will us the SystemCopyDialog
46
 * Xuan Chen        (IBM)        - [229093] set charset of the temp file of the text remote file to its remote encoding
46
 * Xuan Chen        (IBM)        - [229093] set charset of the temp file of the text remote file to its remote encoding
47
 * Rupen Mardirossian (IBM)      - [198728] downloadResourcesToWorkspace now creates empty folders for copying across connections via createEmptyFolders method
47
 * Rupen Mardirossian (IBM)      - [198728] downloadResourcesToWorkspace now creates empty folders for copying across connections via createEmptyFolders method
48
 * David McKnight     (IBM)      - [229610] [api] File transfers should use workspace text file encoding
48
 ********************************************************************************/
49
 ********************************************************************************/
49
50
50
package org.eclipse.rse.files.ui.resources;
51
package org.eclipse.rse.files.ui.resources;
Lines 280-286 Link Here
280
					else 
281
					else 
281
					{
282
					{
282
						// using text mode so the char set needs to be local
283
						// using text mode so the char set needs to be local
283
						String localEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
284
						String localEncoding = tempFile.getParent().getDefaultCharset();
284
						SystemIFileProperties properties = new SystemIFileProperties(tempFile);
285
						SystemIFileProperties properties = new SystemIFileProperties(tempFile);
285
						if (properties.getLocalEncoding() != null){
286
						if (properties.getLocalEncoding() != null){
286
							localEncoding = properties.getLocalEncoding();
287
							localEncoding = properties.getLocalEncoding();
Lines 588-594 Link Here
588
								else 
589
								else 
589
								{
590
								{
590
									// using text mode so the char set needs to be local
591
									// using text mode so the char set needs to be local
591
									String localEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
592
									String localEncoding = tempFile.getParent().getDefaultCharset();
592
									if (properties.getLocalEncoding() != null){
593
									if (properties.getLocalEncoding() != null){
593
										localEncoding = properties.getLocalEncoding();
594
										localEncoding = properties.getLocalEncoding();
594
									}					
595
									}					
Lines 970-976 Link Here
970
			// copy remote file to workspace
971
			// copy remote file to workspace
971
			SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
972
			SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
972
			listener.addIgnoreFile(tempFile);
973
			listener.addIgnoreFile(tempFile);
973
			String encoding = System.getProperty("file.encoding"); //$NON-NLS-1$
974
			String encoding = tempFile.getParent().getDefaultCharset();
975
974
			download(srcFileOrFolder, tempFile, encoding, monitor);
976
			download(srcFileOrFolder, tempFile, encoding, monitor);
975
			listener.removeIgnoreFile(tempFile);
977
			listener.removeIgnoreFile(tempFile);
976
			if (!tempFile.exists() && !tempFile.isSynchronized(IResource.DEPTH_ZERO))
978
			if (!tempFile.exists() && !tempFile.isSynchronized(IResource.DEPTH_ZERO))
(-)src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java (-1 / +3 lines)
Lines 31-36 Link Here
31
 * David McKnight   (IBM)        - [224377] "open with" menu does not have "other" option
31
 * David McKnight   (IBM)        - [224377] "open with" menu does not have "other" option
32
 * Kevin Doyle		(IBM)		 - [224162] SystemEditableRemoteFile.saveAs does not work because FileServiceSubSytem.upload does invalid check
32
 * Kevin Doyle		(IBM)		 - [224162] SystemEditableRemoteFile.saveAs does not work because FileServiceSubSytem.upload does invalid check
33
 * David McKnight (IBM) 		 - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
33
 * David McKnight (IBM) 		 - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
34
 * David McKnight     (IBM)      - [229610] [api] File transfers should use workspace text file encoding
34
 *******************************************************************************/
35
 *******************************************************************************/
35
36
36
package org.eclipse.rse.files.ui.resources;
37
package org.eclipse.rse.files.ui.resources;
Lines 1523-1529 Link Here
1523
				}
1524
				}
1524
				else {
1525
				else {
1525
					// using text mode so the char set needs to be local
1526
					// using text mode so the char set needs to be local
1526
					String localEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
1527
					String localEncoding = file.getParent().getDefaultCharset();
1528
1527
					if (properties.getLocalEncoding() != null){
1529
					if (properties.getLocalEncoding() != null){
1528
						localEncoding = properties.getLocalEncoding();
1530
						localEncoding = properties.getLocalEncoding();
1529
					}					
1531
					}					
(-)src/org/eclipse/rse/services/files/AbstractFileService.java (-1 / +2 lines)
Lines 38-43 Link Here
38
import org.eclipse.core.runtime.IProgressMonitor;
38
import org.eclipse.core.runtime.IProgressMonitor;
39
39
40
import org.eclipse.rse.services.AbstractService;
40
import org.eclipse.rse.services.AbstractService;
41
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
41
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
42
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
42
43
43
44
Lines 186-192 Link Here
186
	 * @since 2.0
187
	 * @since 2.0
187
	 */
188
	 */
188
	public String getEncoding(IProgressMonitor monitor) throws SystemMessageException {
189
	public String getEncoding(IProgressMonitor monitor) throws SystemMessageException {
189
		return System.getProperty("file.encoding"); //$NON-NLS-1$
190
		return SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
190
	}
191
	}
191
192
192
	/**
193
	/**
(-)clientserver/org/eclipse/rse/services/clientserver/SystemEncodingUtil.java (-1 / +48 lines)
Lines 13-19 Link Here
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * David McKnight   (IBM) [215847]SystemEncodingUtil needs to convert to unsigned when checking xml file
15
 * David McKnight   (IBM) [215847]SystemEncodingUtil needs to convert to unsigned when checking xml file
16
 * 
16
 * David McKnight     (IBM)      - [229610] [api] File transfers should use workspace text file encoding
17
 *******************************************************************************/
17
 *******************************************************************************/
18
18
19
package org.eclipse.rse.services.clientserver;
19
package org.eclipse.rse.services.clientserver;
Lines 31-36 Link Here
31
	
31
	
32
	private static SystemEncodingUtil instance;
32
	private static SystemEncodingUtil instance;
33
	public static String ENCODING_UTF_8 = "UTF-8"; //$NON-NLS-1$
33
	public static String ENCODING_UTF_8 = "UTF-8"; //$NON-NLS-1$
34
	
35
	private DefaultEncodingProvider _defaultEncodingProvider = new DefaultEncodingProvider();
34
36
35
	/**
37
	/**
36
	 * Constructor to create the utility class.
38
	 * Constructor to create the utility class.
Lines 52-57 Link Here
52
		return instance;
54
		return instance;
53
	}
55
	}
54
	
56
	
57
58
59
	   /**
60
	    * Provider for the default encodings that RSE uses.
61
	    * Clients may subclass this class, and override methods.
62
	    * @since org.eclipse.rse.services 3.0
63
	    */
64
	   public class DefaultEncodingProvider {
65
66
	      /**
67
	       * Return the default encoding for local workspace resources.
68
	       * Clients may override.
69
	       * @return String the local default encoding.
70
	       */
71
	      public String getLocalDefaultEncoding() {
72
	          return System.getProperty("file.encoding"); //$NON-NLS-1$
73
	      }
74
	   }
75
76
   /**
77
    * Change the default encoding provider.
78
    *
79
    * This is a system-wide change, and clients will not be notified
80
    * of changed default encodings due to changing the provider. Therefore,
81
    * changing the provider should be done only once during early system 
82
    * startup.
83
    * 
84
    * @param p the new encoding provider.
85
    */
86
	public void setDefaultEncodingProvider(DefaultEncodingProvider p) {
87
	    _defaultEncodingProvider = p;
88
	}
89
90
	/**
91
	 * Returns the local default encoding as provided by the default encoding 
92
	 * provider.  This method should be called after RSE startup is complete
93
	 * in order to get the proper default workspace encoding.    
94
	 * 
95
	 * @return the local default encoding
96
	 */
97
	public String getLocalDefaultEncoding() {
98
	   return _defaultEncodingProvider.getLocalDefaultEncoding();
99
	}
100
101
	   
55
	/**
102
	/**
56
	 * Gets the encoding of the environment. This is the encoding being used by the JVM,
103
	 * Gets the encoding of the environment. This is the encoding being used by the JVM,
57
	 * which by default is the machine encoding, unless changed explicitly.
104
	 * which by default is the machine encoding, unless changed explicitly.
(-)src/org/eclipse/rse/internal/importexport/files/RemoteExporter.java (-2 / +4 lines)
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
10
 * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
11
 * David McKnight     (IBM)      - [229610] [api] File transfers should use workspace text file encoding
11
 *******************************************************************************/
12
 *******************************************************************************/
12
package org.eclipse.rse.internal.importexport.files;
13
package org.eclipse.rse.internal.importexport.files;
13
14
Lines 21-27 Link Here
21
import org.eclipse.core.runtime.IPath;
22
import org.eclipse.core.runtime.IPath;
22
import org.eclipse.core.runtime.NullProgressMonitor;
23
import org.eclipse.core.runtime.NullProgressMonitor;
23
import org.eclipse.rse.core.model.IHost;
24
import org.eclipse.rse.core.model.IHost;
24
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
25
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
25
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
26
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
26
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
27
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
27
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
Lines 99-105 Link Here
99
			// for windows
99
			// for windows
100
			dest = dest.replace('/', sep);
100
			dest = dest.replace('/', sep);
101
		}
101
		}
102
		rfss.upload(file.getLocation().makeAbsolute().toOSString(), SystemEncodingUtil.ENCODING_UTF_8, dest, System.getProperty("file.encoding"), new NullProgressMonitor()); //$NON-NLS-1$
102
		String localEncoding = file.getCharset();
103
		String hostEncoding = Utilities.getIRemoteFile(_host, dest).getEncoding();
104
		rfss.upload(file.getLocation().makeAbsolute().toOSString(), localEncoding, dest, hostEncoding, new NullProgressMonitor()); //$NON-NLS-1$
103
	}
105
	}
104
106
105
	/**
107
	/**
(-)src/org/eclipse/rse/internal/importexport/files/RemoteFileImportOperation.java (-3 / +3 lines)
Lines 10-19 Link Here
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
11
 * David McKnight   (IBM)        - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
11
 * David McKnight   (IBM)        - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
12
 * David McKnight   (IBM)        - [223204] [cleanup] fix broken nls strings in files.ui and others
12
 * David McKnight   (IBM)        - [223204] [cleanup] fix broken nls strings in files.ui and others
13
 * David McKnight     (IBM)      - [229610] [api] File transfers should use workspace text file encoding
13
 *******************************************************************************/
14
 *******************************************************************************/
14
package org.eclipse.rse.internal.importexport.files;
15
package org.eclipse.rse.internal.importexport.files;
15
16
16
import java.io.ByteArrayInputStream;
17
imimport java.io.ByteArrayInputStream;
17
import java.io.ByteArrayOutputStream;
18
import java.io.ByteArrayOutputStream;
18
import java.io.File;
19
import java.io.File;
19
import java.io.IOException;
20
import java.io.IOException;
Lines 49-55 Link Here
49
import org.eclipse.ui.actions.WorkspaceModifyOperation;
50
import org.eclipse.ui.actions.WorkspaceModifyOperation;
50
import org.eclipse.ui.dialogs.ContainerGenerator;
51
import org.eclipse.ui.dialogs.ContainerGenerator;
51
import org.eclipse.ui.dialogs.IOverwriteQuery;
52
import org.eclipse.ui.dialogs.IOverwriteQuery;
52
53
// Similar to org.eclipse.ui.wizards.datatransfer.ImportOperation
53
// Similar to org.eclipse.ui.wizards.datatransfer.ImportOperation
54
/**
54
/**
55
 * An operation which does the actual work of copying objects from the local
55
 * An operation which does the actual work of copying objects from the local
Lines 463-469 Link Here
463
			// 030820: added the following kludge to circumvent problem in
463
			// 030820: added the following kludge to circumvent problem in
464
			// artemis.  (artemis 3 will fix this)
464
			// artemis.  (artemis 3 will fix this)
465
			// TODO remove for 6.0
465
			// TODO remove for 6.0
466
			String encoding = System.getProperty("file.encoding"); //$NON-NLS-1$
466
			String encoding = ((UniFilePlus) fileObject).remoteFile.getEncoding();
467
			if (encoding.startsWith("CP")) //$NON-NLS-1$
467
			if (encoding.startsWith("CP")) //$NON-NLS-1$
468
			{
468
			{
469
				encoding = "Cp" + encoding.substring(2); //$NON-NLS-1$
469
				encoding = "Cp" + encoding.substring(2); //$NON-NLS-1$
(-)src/org/eclipse/rse/internal/core/RSEInitJob.java (+13 lines)
Lines 7-12 Link Here
7
 * Contributors:
7
 * Contributors:
8
 * David Dykstal (IBM) - [197167] adding notification and waiting for RSE model
8
 * David Dykstal (IBM) - [197167] adding notification and waiting for RSE model
9
 * David Dykstal (IBM) - [226728] NPE during init with clean workspace
9
 * David Dykstal (IBM) - [226728] NPE during init with clean workspace
10
 * David McKnight     (IBM)      - [229610] [api] File transfers should use workspace text file encoding
10
 ********************************************************************************/
11
 ********************************************************************************/
11
package org.eclipse.rse.internal.core;
12
package org.eclipse.rse.internal.core;
12
13
Lines 15-20 Link Here
15
import java.util.ArrayList;
16
import java.util.ArrayList;
16
import java.util.List;
17
import java.util.List;
17
18
19
import org.eclipse.core.resources.ResourcesPlugin;
18
import org.eclipse.core.runtime.CoreException;
20
import org.eclipse.core.runtime.CoreException;
19
import org.eclipse.core.runtime.IConfigurationElement;
21
import org.eclipse.core.runtime.IConfigurationElement;
20
import org.eclipse.core.runtime.IPath;
22
import org.eclipse.core.runtime.IPath;
Lines 36-41 Link Here
36
import org.eclipse.rse.internal.core.model.SystemModelChangeEvent;
38
import org.eclipse.rse.internal.core.model.SystemModelChangeEvent;
37
import org.eclipse.rse.internal.core.model.SystemProfileManager;
39
import org.eclipse.rse.internal.core.model.SystemProfileManager;
38
import org.eclipse.rse.logging.Logger;
40
import org.eclipse.rse.logging.Logger;
41
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
39
42
40
/**
43
/**
41
 * This is a job named "Initialize RSE". It is instantiated and run during
44
 * This is a job named "Initialize RSE". It is instantiated and run during
Lines 203-208 Link Here
203
			}
206
			}
204
			submonitor.done();
207
			submonitor.done();
205
		}
208
		}
209
		
210
		// set the default encoding provider
211
		SystemEncodingUtil encodingUtil = SystemEncodingUtil.getInstance();
212
		encodingUtil.setDefaultEncodingProvider(
213
				encodingUtil.new DefaultEncodingProvider(){
214
					   public String getLocalDefaultEncoding() {
215
						   	return ResourcesPlugin.getPlugin().getPluginPreferences().getString(ResourcesPlugin.PREF_ENCODING);					        
216
					   }
217
				});
218
		
206
		initializerPhase.done();
219
		initializerPhase.done();
207
		// finish up - propogate cancel if necessary
220
		// finish up - propogate cancel if necessary
208
		if (monitor.isCanceled()) {
221
		if (monitor.isCanceled()) {
(-)src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java (-5 / +6 lines)
Lines 41-47 Link Here
41
 * David McKnight    (IBM)       - [220379] [api] Provide a means for contributing custom BIDI encodings
41
 * David McKnight    (IBM)       - [220379] [api] Provide a means for contributing custom BIDI encodings
42
 * David McKnight    (IBM)       - [225573] [dstore] client not falling back to single operation when missing batch descriptors (due to old server)
42
 * David McKnight    (IBM)       - [225573] [dstore] client not falling back to single operation when missing batch descriptors (due to old server)
43
 * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
43
 * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
44
 * David McKnight     (IBM)    - [227406][api][dstore] need apis for getting buffer size in IDataStoreProvider
44
 * David McKnight     (IBM)      - [227406][api][dstore] need apis for getting buffer size in IDataStoreProvider
45
 * David McKnight     (IBM)      - [229610] [api] File transfers should use workspace text file encoding
45
 *******************************************************************************/
46
 *******************************************************************************/
46
47
47
package org.eclipse.rse.internal.services.dstore.files;
48
package org.eclipse.rse.internal.services.dstore.files;
Lines 80-85 Link Here
80
import org.eclipse.rse.services.clientserver.ISystemFileTypes;
81
import org.eclipse.rse.services.clientserver.ISystemFileTypes;
81
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
82
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
82
import org.eclipse.rse.services.clientserver.PathUtility;
83
import org.eclipse.rse.services.clientserver.PathUtility;
84
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
83
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
85
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
84
import org.eclipse.rse.services.clientserver.messages.CommonMessages;
86
import org.eclipse.rse.services.clientserver.messages.CommonMessages;
85
import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
87
import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
Lines 775-781 Link Here
775
			if (resultChild.getType().equals(IUniversalDataStoreConstants.DOWNLOAD_RESULT_SUCCESS_TYPE))
777
			if (resultChild.getType().equals(IUniversalDataStoreConstants.DOWNLOAD_RESULT_SUCCESS_TYPE))
776
			{
778
			{
777
				if (!isBinary){ // do standard conversion if this is text!
779
				if (!isBinary){ // do standard conversion if this is text!
778
					String localEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
780
					String localEncoding = SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
779
781
780
					IFileServiceCodePageConverter codePageConverter = CodePageConverterManager.getCodePageConverter(encoding, this);
782
					IFileServiceCodePageConverter codePageConverter = CodePageConverterManager.getCodePageConverter(encoding, this);
781
783
Lines 1018-1024 Link Here
1018
					{
1020
					{
1019
						// do standard conversion if this is text!
1021
						// do standard conversion if this is text!
1020
						if (!isBinaries[i]){ // do standard conversion if this is text!
1022
						if (!isBinaries[i]){ // do standard conversion if this is text!
1021
							String localEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
1023
							String localEncoding = SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
1022
							IFileServiceCodePageConverter codePageConverter = CodePageConverterManager.getCodePageConverter(hostEncodings[i], this);
1024
							IFileServiceCodePageConverter codePageConverter = CodePageConverterManager.getCodePageConverter(hostEncodings[i], this);
1023
1025
1024
							codePageConverter.convertFileFromRemoteEncoding(remoteElement.getName(), localFile, hostEncodings[i], localEncoding, this);
1026
							codePageConverter.convertFileFromRemoteEncoding(remoteElement.getName(), localFile, hostEncodings[i], localEncoding, this);
Lines 1484-1491 Link Here
1484
		}
1486
		}
1485
1487
1486
1488
1487
1489
		if (status == null) return false; 
1488
		if (status == null) return false;
1489
		if (null != monitor && monitor.isCanceled())
1490
		if (null != monitor && monitor.isCanceled())
1490
		{
1491
		{
1491
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
1492
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
(-)src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java (-1 / +2 lines)
Lines 75-80 Link Here
75
import org.eclipse.rse.services.clientserver.IClientServerConstants;
75
import org.eclipse.rse.services.clientserver.IClientServerConstants;
76
import org.eclipse.rse.services.clientserver.IMatcher;
76
import org.eclipse.rse.services.clientserver.IMatcher;
77
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
77
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
78
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
78
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
79
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
79
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
80
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
80
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
81
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
Lines 1466-1472 Link Here
1466
			return encoding;
1467
			return encoding;
1467
		}
1468
		}
1468
		else {
1469
		else {
1469
			return System.getProperty("file.encoding"); //$NON-NLS-1$
1470
			return SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
1470
		}
1471
		}
1471
	}
1472
	}
1472
}
1473
}
(-)UI/org/eclipse/rse/ui/SystemConnectionForm.java (-1 / +4 lines)
Lines 21-26 Link Here
21
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
21
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
22
 * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
22
 * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
23
 * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
23
 * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
24
 * David McKnight     (IBM)      - [229610] [api] File transfers should use workspace text file encoding
24
 ********************************************************************************/
25
 ********************************************************************************/
25
26
26
package org.eclipse.rse.ui;
27
package org.eclipse.rse.ui;
Lines 49-54 Link Here
49
import org.eclipse.rse.core.model.ISystemProfile;
50
import org.eclipse.rse.core.model.ISystemProfile;
50
import org.eclipse.rse.core.model.ISystemRegistry;
51
import org.eclipse.rse.core.model.ISystemRegistry;
51
import org.eclipse.rse.internal.ui.SystemResources;
52
import org.eclipse.rse.internal.ui.SystemResources;
53
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
52
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
54
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
53
import org.eclipse.rse.ui.dialogs.ISystemPromptDialog;
55
import org.eclipse.rse.ui.dialogs.ISystemPromptDialog;
54
import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
56
import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
Lines 959-965 Link Here
959
				otherEncodingCombo.setText(defaultEncoding);
961
				otherEncodingCombo.setText(defaultEncoding);
960
			}
962
			}
961
			else {
963
			else {
962
				otherEncodingCombo.setText(System.getProperty("file.encoding")); //$NON-NLS-1$
964
				String workspaceDefault = SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
965
				otherEncodingCombo.setText(workspaceDefault); //$NON-NLS-1$
963
			}
966
			}
964
		}
967
		}
965
		
968
		

Return to bug 229610