History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-15732
Type: Bug Bug
Status: Reopened Reopened
Priority: Normal Normal
Assignee: Dmitry Jemerov
Reporter: Amnon I. Govrin
Votes: 3
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Selena doesn't switch to UTF-8 when comparing Perforce file to workspace file

Created: 22 Mar 07 21:48   Updated: 02 Apr 08 04:12
Component/s: Version Control Integration. Perforce
Fix Version/s: Selena 6808 (pre-M1)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. BadDiff.png
(159 kb)
Environment: Vista / XP Pro, JRE6, Perforce
Issue Links:
Duplicate
 
This issue is duplicated by:
IDEADEV-20183 ClearCase: incorrect encoding for diff Major Resolved

Build: 6,763
Fixed in build: 6,806
Severity: High


 Description  « Hide
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.

 All   Comments   Work Log   Change History      Sort Order:
Amnon I. Govrin - 02 Apr 07 21:37
Fixed for our .js file, but not for Java files.

Dmitry Jemerov - 05 Apr 07 14:00
Do the Java files have a byte order mark? The fix was not specific to any filetype.

Amnon I. Govrin - 05 Apr 07 19:25
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 - 05 Apr 07 19:29
Ah, sorry, the fix was indeed not quite complete.

Amnon I. Govrin - 06 Apr 07 23:53
Still, no cigar. Still squares on the left and Japanese on the right with our Java string bundle.

Amnon


Amnon I. Govrin - 06 Apr 07 23:59
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 - 06 Jul 07 19:41
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 - 02 Apr 08 04:12
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.