[Update] Text File Compare v1.60 (no setup)

M

Mel

This plain text file comparison utility displays a pair of files
side-by-side in a vertically-split display, so that the differences
between them are apparent. There are a number of customization options,
some of which make it especially suitable for comparing program source
code written in the Natural® language. But it is not limited to this
purpose, and will handle any pair of text files, whether source code or
data. It also compares the text portion of binary files such as
spreadsheets and word processor documents, which you can import via
Paste buttons on the front panel. It is possible to edit both files and
save the results, with easy ways to merge selected changes between both
sides of the comparison window.

http://www.homestead.com/adriancarter/Compare.html
 
A

Adrian Carter

Correction.
Should have said **Limited** Unicode support.
It can't display 16-bit characters. If comparing Unicode files,
it attempts a UTF16-UTF8 conversion, and displays the result
if successful. If saving changes, made via editing mode, and
the originating file is Unicode, it does the reverse UTF8-UTF16
conversion.

Adrian
 
T

Terry

Adrian said:
Correction.
Should have said **Limited** Unicode support.
It can't display 16-bit characters. If comparing Unicode files,
it attempts a UTF16-UTF8 conversion, and displays the result
if successful. If saving changes, made via editing mode, and
the originating file is Unicode, it does the reverse UTF8-UTF16
conversion.

This seems confusing. I've always understood that UTF16 and UTF8 both
support the same character set, it's just the encoding that is
different. So if you can display one, you can display the other.
Displaying all characters in UTF-8 (or UTF-16) is difficult; you would
need a font designed to do this.

Do you mean you convert UTF16 to the current code page? That's what it
sounds like.

Terry
 
A

Adrian Carter

Terry said:
This seems confusing. I've always understood that UTF16 and UTF8 both
support the same character set, it's just the encoding that is
different. So if you can display one, you can display the other.
Displaying all characters in UTF-8 (or UTF-16) is difficult; you would
need a font designed to do this.

Do you mean you convert UTF16 to the current code page? That's what it
sounds like.

Terry

To explain more fully.
The C++ Builder richedit control that it uses is not Unicode-capable.
I use a couple of UTF16<->UTf8 conversion routines that I picked
up at http://www.unicode.com (which BTW I think contain a slight
error, it wouldn't work for me at all until I made a minor change).
So you end up with an array of strings in UTF8 in the current codepage
instead of having to deal with something where every 2nd byte is \0.
If the conversion doesn't work, the program fails (but previous versions
wouldn't have worked either).
I don't have a lot of experience in this area, have taken advice from
somebody at the office who knows a lot more than me. It has worked
on most of the stuff I tested it with, but I don't have a lot of exposure
to the kinds of datasets that would make it fail. At least, when it fails
it fails obviously.
If anyone can provide me with examples that make it fail, I can
work at making it more bulletproof.

HTH,
Adrian
 
A

Adrian Carter

.... snipppage
To explain more fully.
The C++ Builder richedit control that it uses is not Unicode-capable.
I use a couple of UTF16<->UTf8 conversion routines that I picked
up at http://www.unicode.com (which BTW I think contain a slight
error, it wouldn't work for me at all until I made a minor change).
.. more snippage

Oops! That link should be http://www.unicode.org .

Adrian
 
T

Terry

Adrian said:
... snipppage


Oops! That link should be http://www.unicode.org .

I don't see anything on that site that contains any code at all, but
perhaps it's hidden behind the members-only page.

At any rate, you don't need third-party code to convert UTF-16 to and
from UTF-8 on windows. Just use the windows API calls
MultiByteToWideChar and WideCharToMultiByte, and specify CP_UTF8 as
the CodePage.

Terry
 
A

Adrian Carter

......
I don't see anything on that site that contains any code at all, but
perhaps it's hidden behind the members-only page.

At any rate, you don't need third-party code to convert UTF-16 to and
from UTF-8 on windows. Just use the windows API calls
MultiByteToWideChar and WideCharToMultiByte, and specify CP_UTF8 as
the CodePage.

Terry

The C source and header files are here:
http://www.unicode.org/Public/PROGRAMS/CVTUTF/

Thanks for the windows API info - I'll see if it does better.

Adrian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top