Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2004-03-08 20:39:48 +0000
committerAndre Weinand2004-03-08 20:39:48 +0000
commitc5cf820a6c11a876f867ae39e5d858fdf33d9afc (patch)
tree3bcae0146ea53e216479c962448dd208c186a9aa
parentc677e1fcdb887af9fe72c693c6665d72dc5b319d (diff)
downloadeclipse.platform.team-c5cf820a6c11a876f867ae39e5d858fdf33d9afc.tar.gz
eclipse.platform.team-c5cf820a6c11a876f867ae39e5d858fdf33d9afc.tar.xz
eclipse.platform.team-c5cf820a6c11a876f867ae39e5d858fdf33d9afc.zip
encoding work
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java3
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index acdc48f9e..d63c17964 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -43,6 +43,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.CoreException;
@@ -1964,7 +1965,7 @@ public class TextMergeViewer extends ContentMergeViewer {
if (contents != null) {
byte[] bytes;
try {
- bytes= contents.getBytes("UTF-16"); //$NON-NLS-1$
+ bytes= contents.getBytes(ResourcesPlugin.getEncoding());
} catch(UnsupportedEncodingException ex) {
// use default encoding
bytes= contents.getBytes();
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index acdc48f9e..d63c17964 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -43,6 +43,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.CoreException;
@@ -1964,7 +1965,7 @@ public class TextMergeViewer extends ContentMergeViewer {
if (contents != null) {
byte[] bytes;
try {
- bytes= contents.getBytes("UTF-16"); //$NON-NLS-1$
+ bytes= contents.getBytes(ResourcesPlugin.getEncoding());
} catch(UnsupportedEncodingException ex) {
// use default encoding
bytes= contents.getBytes();

Back to the top