Error! File data contains NUL character

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
Tom.Wells
Posts: 65
Joined: Tue Sep 21, 2004 10:35 am

Error! File data contains NUL character

Post by Tom.Wells » Tue Jul 01, 2008 9:58 am

We have some source from our mainframe that contains a short string of null values. This comes from the mainframe application development software and is on half of the files. Most of the file is plain text. When we put this source away in Vault we don't think to remove the nulls. Often they are not even noticable. Didn't diff merge used to ignore this? Is there a way to get it to ignore it now? We have had to use ExamDiff manually to diff these files.

Thanks

Tom

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Sorry, but no.

Post by jeffhostetler » Tue Jul 01, 2008 12:04 pm

Sorry. The new version of DiffMerge is completely Unicode based
and as such requires valid files -- valid in the sense that they can
be read and converted from whatever character encoding they have
on disk into Unicode before being displayed.

None of the encoding converters allow NUL characters in the
input stream -- because NUL isn't a valid Unicode character and
nothing should map to it.

I know this doesn't help with the problem at hand, but that's why
it doesn't work now....

Would it help if I trapped the NUL bytes and stripped them out or
substituted a slug character of some kind??

Alternatively, if you have a copy of the old DiffMerge that shipped
with 3.5, you can drop it in as a replacement for the new version.
Both have the same command line arguments. This might not be
the best option, but you wouldn't have to manually switch back and
forth....

jeff

Tom.Wells
Posts: 65
Joined: Tue Sep 21, 2004 10:35 am

Post by Tom.Wells » Wed Jul 02, 2008 7:23 am

Jeff,

It would be great if there were an option to either ignore nulls (and other invalid Unicode characters) or convert them to spaces. Could you add this to a wish list? We're going to try to round up an older version of the program and see if we can plug it in to get by for now.

Tom

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

i'll log this.

Post by jeffhostetler » Wed Jul 02, 2008 7:37 am

i'll add this to the feature request.

let me know if you have a problem finding a copy of the
old version.

FWIW, you might install the old .exe with a different name
(such as sgdm1.exe) and put it in the vault/fortress directory
(along side the new sgdm.exe). then you can switch between
versions using the vault/fortress options dialog and simply
update the exe name in the dialog.

jeff

Tom.Wells
Posts: 65
Joined: Tue Sep 21, 2004 10:35 am

Post by Tom.Wells » Wed Jul 02, 2008 7:39 am

Great. Thanks. I've also tried hooking up ExamDiff. It works fine. It doesn't care about the nulls.

Post Reply