Index: compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java,v retrieving revision 1.147 diff -u -r1.147 TextMergeViewer.java --- compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java 21 Jun 2005 12:37:18 -0000 1.147 +++ compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java 19 Jan 2006 16:28:27 -0000 @@ -1667,15 +1667,15 @@ } // set new documents - setDocument(fLeft, 'L', left); + setDocument(fLeft, 'L', left, null); fLeftLineCount= fLeft.getLineCount(); fLeftEncoding= getEncoding(left); - setDocument(fRight, 'R', right); + setDocument(fRight, 'R', right, fLeftEncoding); fRightLineCount= fRight.getLineCount(); - fRightEncoding= getEncoding(right); + fRightEncoding= getEncoding(fLeftEncoding); - setDocument(fAncestor, 'A', ancestor); + setDocument(fAncestor, 'A', ancestor, fLeftEncoding); updateHeader(); updateControls(); @@ -1899,7 +1899,7 @@ /* * Returns true if a new Document could be installed. */ - private boolean setDocument(MergeSourceViewer tp, char type, Object o) { + private boolean setDocument(MergeSourceViewer tp, char type, Object o, String encoding) { if (tp == null) return false; @@ -1922,7 +1922,7 @@ String s= null; try { - s= Utilities.readString(sca); + s= (encoding == null ? Utilities.readString(sca) : Utilities.readString(sca.getContents(), encoding)); } catch (CoreException ex) { setError(type, ex.getMessage()); }