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 33341 Details for
Bug 72995
When comparing with CVS we see a wrong encoding
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
New patch fixing encodings
patch.txt (text/plain), 2.37 KB, created by
Gilles Querret
on 2006-01-20 04:02:21 EST
(
hide
)
Description:
New patch fixing encodings
Filename:
MIME Type:
Creator:
Gilles Querret
Created:
2006-01-20 04:02:21 EST
Size:
2.37 KB
patch
obsolete
>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 20 Jan 2006 08:43:35 -0000 >@@ -1665,17 +1665,22 @@ > mcp.setLeftError(null); > mcp.setRightError(null); > } >+ >+ // Get encodings from streams. If an encoding is null, abide by the another one >+ // Defaults to workbench encoding only if both encodings are null >+ fLeftEncoding= getEncoding(left); >+ fRightEncoding= getEncoding(right); >+ fLeftEncoding = (fLeftEncoding == null ? fRightEncoding : fLeftEncoding); >+ fRightEncoding = (fRightEncoding == null ? fLeftEncoding : fRightEncoding); > > // set new documents >- setDocument(fLeft, 'L', left); >+ setDocument(fLeft, 'L', left, fLeftEncoding); > fLeftLineCount= fLeft.getLineCount(); >- fLeftEncoding= getEncoding(left); >- >- setDocument(fRight, 'R', right); >+ >+ setDocument(fRight, 'R', right, fRightEncoding); > fRightLineCount= fRight.getLineCount(); >- fRightEncoding= getEncoding(right); > >- setDocument(fAncestor, 'A', ancestor); >+ setDocument(fAncestor, 'A', ancestor, fLeftEncoding); > > updateHeader(); > updateControls(); >@@ -1740,8 +1745,11 @@ > // ignored > } > } >- if (encoding == null) >- encoding= ResourcesPlugin.getEncoding(); >+ // Bug #72995 : don't fall back to default workspace encoding >+ // Use source stream encoding instead >+// if (encoding == null) >+// encoding= ResourcesPlugin.getEncoding(); >+ > return encoding; > } > >@@ -1899,7 +1907,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 +1930,7 @@ > String s= null; > > try { >- s= Utilities.readString(sca); >+ s= Utilities.readString(sca.getContents(), (encoding == null ? ResourcesPlugin.getEncoding() : encoding)); > } catch (CoreException ex) { > setError(type, ex.getMessage()); > }
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 72995
:
16234
|
33272
| 33341