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

Bug 320785

Summary: Encoding is broken for diff in history view
Product: [Technology] EGit Reporter: Ilya Klyuchnikov <ilya.klyuchnikov>
Component: UIAssignee: Stefan Lay <stefan.lay>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: caniszczyk, mathias.kinzler, matthias.sohn, stefan.lay
Version: 0.8.1   
Target Milestone: 0.9.0-M3   
Hardware: Macintosh   
OS: Mac OS X   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=307507
Whiteboard:
Attachments:
Description Flags
screen shot of egit
none
screen shot of gitX none

Description Ilya Klyuchnikov CLA 2010-07-24 03:34:13 EDT
I have a project with texts in russian (encoding is UTF-8 and workspace default encoding is also UTF-8). The diff widget in egit history view displays russian texts incorrectly.

See 2 attached screen shots - the first one is for egit (incorrect displaying) and the second one is gitX (correct displaying).

PS. I use eclipse Helios with egit 0.8.4
Comment 1 Ilya Klyuchnikov CLA 2010-07-24 03:35:31 EDT
Created attachment 175125 [details]
screen shot of egit
Comment 2 Ilya Klyuchnikov CLA 2010-07-24 03:35:58 EDT
Created attachment 175126 [details]
screen shot of gitX
Comment 3 Stefan Lay CLA 2010-07-27 07:19:50 EDT
Could be reproduced on Windows Vista.
Comment 4 Stefan Lay CLA 2010-08-30 08:15:02 EDT
Fix proposed: http://egit.eclipse.org/r/#change,1457
Comment 5 Matthias Sohn CLA 2010-08-31 10:08:28 EDT
merged as 81014703c6a679b3a9dcc6a0ac496319497e4512
Comment 6 Ilya Klyuchnikov CLA 2010-09-01 02:11:23 EDT
It is fixed partially: now diff view (as I understand) uses default system encoding for rendering diffs.

Just for example: on Mac default encoding is MacRoman, I use UTF-8 as default encoding in the workspace, now egit shows me diffs as if I used MacRoman encoding, - egit doesn't take into account the actual encoding of resource. 

However, there is a dirty workaround: I use -Dfile.encoding=UTF-8 as an extra parameter when starting eclipse, and it works for me.
Comment 7 Stefan Lay CLA 2010-09-01 07:52:10 EDT
I pushed http://egit.eclipse.org/r/#change,1479 for review to take into account eclipse preferences and project property.
Comment 8 Chris Aniszczyk CLA 2010-09-02 11:47:59 EDT
Fixed as 0c90acfe3886ed886f97b3382acbee9aa6c5f2df.

Thanks Stefan.

Hopefully we don't take much of a performance hit.