This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 67337 - [50cat] Diff considers lines with latin chars to be different and shows local file lines as corrupted
Summary: [50cat] Diff considers lines with latin chars to be different and shows local...
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 5.x
Hardware: PC Windows ME/2000
: P2 blocker with 2 votes (vote)
Assignee: Martin Entlicher
URL:
Keywords: REGRESSION
Depends on: 19928
Blocks:
  Show dependency tree
 
Reported: 2005-10-22 03:52 UTC by misterm
Modified: 2007-01-04 17:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Original file (183 bytes, text/xml)
2005-10-24 20:36 UTC, misterm
Details
Modified file (208 bytes, text/xml)
2005-10-24 20:37 UTC, misterm
Details
Broken diff snapshot (32.67 KB, image/jpeg)
2005-10-24 20:40 UTC, misterm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2005-10-22 03:52:24 UTC
[ BUILD # : 20051013 ]
[ JDK VERSION : 1.4.2_xx ]

If a file contains a "real" difference, diffing it using the diff panel made available by the new CVS support will mark all lines that contain latin characters as different, showing undisplayable characters for the local file. 

For example, if a file contains a line like:

Seção

It is shown correctly in the base file view, but as:

Se■■ao

in the local view (the character I used is 254 in ASCII, but it shows another char instead of this, like a white square).
Comment 1 vbrabant 2005-10-22 09:36:05 UTC
That is maybe a regression of issue 56318.
It was fixed for 4.1 release. And it was working correctly for Java, HTML, XML.

I will recheck for Java, HTML and XML.
Vincent
Comment 2 misterm 2005-10-24 14:33:25 UTC
This happens for Java and XML files.
Comment 3 Maros Sandor 2005-10-24 16:42:52 UTC
I tried to reproduce it with no success.
Comment 4 misterm 2005-10-24 16:45:24 UTC
The way I can always reproduce it is:

1. Get a ISO-8859-1 xml file and add it to CVS;
2. Change any line of it;
3. Diff it.

Can you do it or do you need a sample xml file?
Comment 5 Maros Sandor 2005-10-24 16:57:04 UTC
Sample file would be great.
Comment 6 misterm 2005-10-24 20:36:57 UTC
Created attachment 26296 [details]
Original file
Comment 7 misterm 2005-10-24 20:37:55 UTC
Created attachment 26297 [details]
Modified file
Comment 8 misterm 2005-10-24 20:40:15 UTC
Created attachment 26298 [details]
Broken diff snapshot
Comment 9 misterm 2005-10-24 20:41:54 UTC
I've added two xml files and a snapshot of the broken diff window.
Comment 10 Maros Sandor 2005-10-25 10:07:53 UTC
I can reproduce it with your file. It is probably caused by the fact that one
file has .xml extension while the other one has not.
Comment 11 Maros Sandor 2005-10-25 10:20:07 UTC
The broken.xml file from oiginal location is displayed garbled, broken.xml#1.1
file from CVS/RevisionCache is displayed correctly. Martin, please evaluate what
is wrong with EncodedReaderFactory.
Comment 12 _ pkuzel 2005-10-26 14:16:05 UTC
It's not implementable with current APIs. API RFE filled in
<http://jupiter.czech.sun.com/wiki/view/Nbplan/NbFeature1091>.

I can deliver partial solution for java, xml and properties files.
Comment 13 misterm 2005-10-26 14:27:46 UTC
Two comments:

1. The URL you sent is not public;
2. This used to work in NB 3.5~4.1 _for all files_. So, there must be a way to 
make it work in NB 5.0 _for all files_ as well.
Comment 14 _ pkuzel 2005-10-26 14:58:08 UTC
1. I do not like it either, still usefull for later reference
2. Are you sure? Have you seen the code :-). There is no change in it.

I'm going to add realible encoding detection for mentioned file types.
Comment 15 misterm 2005-10-26 16:31:14 UTC
>------- Additional comments from pkuzel Wed Oct 26 13:58:08 +0000 2005 -------

> 2. Are you sure? Have you seen the code :-). There is no change in it.

Test it using NB 4.1. Or create a second xml with a different file name and 
diff them. No problem happens :-(

> I'm going to add realible encoding detection for mentioned file types.

Based on my comments above, it should work for all file types, since it used to.
Comment 16 _ pkuzel 2005-10-26 17:28:03 UTC
Revealed fatal cvsclient library error in handling piped output.
Comment 17 _ pkuzel 2005-10-26 17:52:59 UTC
Checking in javacvs/libsrc/org/netbeans/lib/cvsclient/response/MessageResponse.java;
/shared/data/ccvs/repository/javacvs/libsrc/org/netbeans/lib/cvsclient/response/MessageResponse.java,v
 <--  MessageResponse.java
new revision: 1.21; previous revision: 1.20
done
Checking in
javacvs/libsrc/org/netbeans/lib/cvsclient/util/LoggedDataInputStream.java;
/shared/data/ccvs/repository/javacvs/libsrc/org/netbeans/lib/cvsclient/util/LoggedDataInputStream.java,v
 <--  LoggedDataInputStream.java
new revision: 1.17; previous revision: 1.16
done
Checking in diff/src/org/netbeans/modules/diff/EncodedReaderFactory.java;
/shared/data/ccvs/repository/diff/src/org/netbeans/modules/diff/EncodedReaderFactory.java,v
 <--  EncodedReaderFactory.java
new revision: 1.7; previous revision: 1.6
done
RCS file:
/shared/data/ccvs/repository/diff/src/org/netbeans/modules/diff/XMLEncodingHelper.java,v
done
Checking in diff/src/org/netbeans/modules/diff/XMLEncodingHelper.java;
/shared/data/ccvs/repository/diff/src/org/netbeans/modules/diff/XMLEncodingHelper.java,v
 <--  XMLEncodingHelper.java
initial revision: 1.1
done
Checking in
javacvs/libsrc/org/netbeans/lib/cvsclient/command/PipedFilesBuilder.java;
/shared/data/ccvs/repository/javacvs/libsrc/org/netbeans/lib/cvsclient/command/PipedFilesBuilder.java,v
 <--  PipedFilesBuilder.java
new revision: 1.13; previous revision: 1.12
done
Checking in javacvs/libsrc/org/netbeans/lib/cvsclient/command/BuildableCommand.java;
/shared/data/ccvs/repository/javacvs/libsrc/org/netbeans/lib/cvsclient/command/BuildableCommand.java,v
 <--  BuildableCommand.java
new revision: 1.23; previous revision: 1.22
done
Checking in javacvs/libsrc/org/netbeans/lib/cvsclient/event/MessageEvent.java;
/shared/data/ccvs/repository/javacvs/libsrc/org/netbeans/lib/cvsclient/event/MessageEvent.java,v
 <--  MessageEvent.java
new revision: 1.12; previous revision: 1.11
done