Announcement

Collapse
No announcement yet.

scripting using text-report

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • scripting using text-report

    Hello.

    I would like to generate a report illustrating a comparison of two txt documents.

    I've created bc_script.txt which has the following command:

    text-report layout:side-by-side options:display-mismatches output-to:"file_compare.html" %1 %2

    As an administrator, at the command line, I'm executing:

    BCompare.exe @bc_script.txt file_old.txt file_new.txt

    I'm getting the following message in the output:

    10/16/2017 12:51:55 PM Fatal Scripting Error: Unable to create report: File Encoding Error (Line 226)

    I've tried many permutations of the above using your on-line help, but it's time to ask for help.

    Thanks!

  • #2
    Hello,

    If you open the file in the graphical interface, it is detecting an encoding error on that line. This may be caused by a combination of a defined encoding and a non-matching (binary?) info on that line.

    For testing the script, I would suggest using two sample, simple files with just a couple lines of plain text.

    Update: Also, I would suggestion adding a few "quotes" around parameters to help capture whitespace, in case any folder paths have spaces in them, like:
    text-report layout:side-by-side options:display-mismatches output-to:"file_compare.html" "%1" "%2"
    Last edited by Aaron; 16-Oct-2017, 01:13 PM. Reason: Update
    Aaron P Scooter Software

    Comment


    • #3
      For testing the script, I would suggest using two sample, simple files with just a couple lines of plain text.
      With simple files, it worked fine. Thank you.

      If you open the file in the graphical interface, it is detecting an encoding error on that line. This may be caused by a combination of a defined encoding and a non-matching (binary?) info on that line.
      Can you say more about what you mean by this? I am a complete newbie. These are two html files and there is a difference in the data on those lines, but the xml tags and hidden characters on that line are identical. Is there any way to get around this issue?

      Comment


      • #4
        Hello,

        If you can email in sample files to support@scootersoftware.com, along with a link back to this forum thread, we can try to provide more detail.

        My guess is that the HTML is defining that it should open with a specific encoding as a tag (which we read and use), but then these lines contain text/data that is not part of that encoding.
        Otherwise, BC4 attempts to auto-detect the encoding to use, and that step might not be detecting the correct one (although we generally match in capability to other applications like Internet Explorer).
        Aaron P Scooter Software

        Comment

        Working...
        X