scripting using text-report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pbh2017
    New User
    • Oct 2017
    • 2

    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!
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #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

    • pbh2017
      New User
      • Oct 2017
      • 2

      #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

      • Aaron
        Team Scooter
        • Oct 2007
        • 16002

        #4
        Hello,

        If you can email in sample files to [email protected], 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...