Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Reopened
Assignee
Irina Chernushina
Subsystem
Version Control. Perforce
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Amnon I. Govrin
    4 years ago (22 Mar 2007 22:48)
  • Updated by   Dmitry Jemerov
    15 months ago (02 Nov 2010 12:36)
  • Jira: IDEADEV-15732
    (history, comments)
 
IDEA-37712 Selena doesn't switch to UTF-8 when comparing Perforce file to workspace file
3
Issue is visible to: All Users
  The issue is visible to the selected user group only
We have a JS file that contains our Ajax App string bundles.
It has special characters, such as ® and Japanese characters. The file is encoded in UTF-8.
When a diff between the workspace version and the checked-in version (Perforce) is made, the left side of the diff shows the file as if it's encoded in ASCII (possibly OS default), even though the default set for IJ is UTF8 and the file is encoded in UTF8.
The right side (local copy) shows up encoded correctly in UTF8.
What that causes is that all the lines with special or Japanese characters appear to be modified, rendering the diff in this case irrelevant.
As a result, the end user has to leave IntelliJ and do the diff in the Perforce client (P4V in my case).
In Demetra it works fine. It broke in Selena, since the 1st EAP build.

Environment: Vista / XP Pro, JRE6, Perforce
Comments (8)
 
History
 
Linked Issues (?)
 
Amnon I. Govrin
  Amnon I. Govrin
02 Apr 2007 22:37
4 years ago
Fixed for our .js file, but not for Java files.
Dmitry Jemerov
  Dmitry Jemerov
05 Apr 2007 15:00
4 years ago
Do the Java files have a byte order mark? The fix was not specific to any filetype.
Amnon I. Govrin
  Amnon I. Govrin
05 Apr 2007 20:25
4 years ago
I'm not sure what you mean. The fact is that it shows OK on the right side (local workspace) but wrong on the left side (Perforce version). I would expect the same character set to be used on both sides of the diff, wrong or right.
Dmitry Jemerov
  Dmitry Jemerov
05 Apr 2007 20:29
4 years ago
Ah, sorry, the fix was indeed not quite complete.
Amnon I. Govrin
  Amnon I. Govrin
07 Apr 2007 00:53
4 years ago
Still, no cigar. Still squares on the left and Japanese on the right with our Java string bundle.

Amnon
Amnon I. Govrin
  Amnon I. Govrin
07 Apr 2007 00:59
4 years ago
Just to be completely clear:
If I ask IJ to show me the file history and I compare 2 versions on Perforce, it is fine (left and right show Japanese characters).
But, if I have the file checked out and compare it by pressing Ctrl+D in the Changes panel, the left side shows squares, and the right shows Japanese, which is strange, as the right side is the checked-out workspace copy and the left side is the checked in version.
Sascha Weinreuter
  Sascha Weinreuter
06 Jul 2007 20:41
4 years ago
The local history has the same issue for UTF-8 encoded XML files in #7051: The left side shows weird characters, the right side is OK.
Travis McLeskey
  Travis McLeskey
02 Apr 2008 05:12
3 years ago
The erroneous diffs also show up for me as diff bars along the left side of the editor panel. This is with a .properties file.