Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333310

Summary: Wrong character encoding in compare of HistoryView
Product: [Technology] EGit Reporter: Mathias Kinzler <mathias.kinzler>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: knsk.mtzk, larryd, leachbj, stefan.lay, stm_
Version: 0.11   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=332928
Whiteboard:
Attachments:
Description Flags
A patch for this issue. none

Description Mathias Kinzler CLA 2010-12-29 11:20:15 EST
The compare editor in the HistoryView seems to use the default encoding instead of the resource encoding. If the project which contains the resource has a different encoding than the workspace, for example, the compare editor will show unreadable characters.
Comment 1 Mathias Kinzler CLA 2010-12-30 07:30:54 EST
I looked into this in some more detail, and it seems that the place to fix this would be to let BlobStorage implement IEncodedStorage instead of IStorage. But then we need to make sure to somehow propagate the encoding back and forth between the resources in the workspace and the Repository....
Comment 2 Bernard Leach CLA 2011-02-09 00:38:41 EST
I'm also seeing this problem on Windows platform where the default file encoding in eclipse does not match actual encoding in the file.  I changed the default to match and the two resources had no more differences.
Comment 3 Kensuke Matsuzaki CLA 2011-02-14 03:09:07 EST
Created attachment 188874 [details]
A patch for this issue.

When right or left of comparing files is real file, use that file's encoding
to decode other hand.
Comment 4 Stefan Lay CLA 2011-06-29 05:15:19 EDT
Fixed with 17cc1ec58b6c5fa