How to show text diff for .fbp7 file in TortoiseHg

TortoiseHg recognises uncompressed FB project files as binary and does not show the text diff for that file.  Hg recognises if a file is binary by looking for a NUL byte, and this can't be overridden in Hg or Tortoise.  However, the file is in XML format and should show fine as a text diff.  

Does anyone know of a way around this so I can get a text diff from TortoiseHg?

Hi,
In FinalBuilder 7 we added Unicode support which means we need to store the project files in UTF-16. It seems that hg treats UTF-16 files as binary.

That said, I was able to compare the files without any issue, using TortoiseHG's Visual Diff. My guess is that your comparison tool doesn't support UTF-16 (we use Beyond Compare, which had no issues).

Hope that helps.

Ben

Hi Ben

Thanks for the clarification - strange behaviour with TortoiseHg and UTF16, but there you go! Have to say I’d forgotten to even try double-clicking the file to bring up the visual diff - d’oh! Works perfectly, so thanks a bunch (I use BC too).

Many thanks

Sean

FinalBuilder 7 we added Unicode support which means we need to store the project files in UTF-16



Strictly speaking I doubt you "need" to store in UTF-16 rather you chose to!

It'd be great if it was possible to specify the encoding. I'd choose UTF-8 so I'm not double byte encoding every character but can use unicode where necessary. That would mean that diff in the commit window would work and would mean smaller project files.

Any chance you can add that?

Hi Robin

Since Ben’s post we added the option to store the project file in UTF-8 for this reason. You can access this option via Options -> FinalBuilder -> Design Time IDE Options. Just change the Project File Encoding option to UTF-8.

Regards,
Steve

@FB Team -

It’s always great when I read about issues you already fixed before I even hit them :smiley: (I need UTF-8 too, once I switch from FB6 to FB7)

IMHO, you really should make UTF-8 the default.

cheers,
Martin

+1 for making UTF-8 the default. It’s great to now have diffs in Hg with FB

I think FinalBuilder should use UTF-8 by default but more importantly, it shouldn’t switch the format (unless that is specifically requested by the user, perhaps an encoding option on the File menu).

We have issues where one team member has the wrong setting and the format will flip-flop between UTF-8 and UTF-16 as different team members edit the build. FinalBuilder should deal with that more gracefully.