NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

ATML Reporting: "An invalid character was found in text content."

Solved!
Go to solution

When using ATML and including non-ASCII characters (decimal code 128 and up), the generated report is not viewable in Internet Explorer (or Firefox, for that matter), producing the error "An invalid character was found in text content." I believe this is because TestStand is not actually encoding the content of the report in UTF-8. The same sequence produces a viewable report using XML reporting. It seems that this issue was found (and fixed) for XML reporting but many years back.

 

If you open the attached XML file in any UTF-8-capable text editor (I used Notepad) and re-save it specifically into UTF-8 format, IE will happily view the report thereafter. The part which really confuses me is that TestStand successfully generates the temporary HTML version of the report for the embedded report viewer (also attached), so the XML parser used internally by TestStand must be a little more lenient than IE.

 

I've included an example sequence with a VI which returns a ReportText string composed of these problematic characters.

0 Kudos
Message 1 of 5
(4,856 Views)

Hello Asbo,

 

What version of TestStand do you have? This is a known bug that was fixed in TestStand 4.2.1.

 

Thanks,

 

Anna K.

National Instruments
0 Kudos
Message 2 of 5
(4,784 Views)

I'm using TestStand 4.2.0.

 

Are you referring to HTML,
XML, and ATML reports do not preserve formatting when displaying string
values that contain LF...
? This is the only item in the 4.2.x Known Issue list that I found relating to ATML and by its description does not cover the issue I'm referring to.

 

Thanks!

0 Kudos
Message 3 of 5
(4,776 Views)
Solution
Accepted by topic author asbo

Asbo -

 

Thank you for bringing this issue to our attention. This behavior will be fixed in a future version of TestStand. In the meantime, you can correct this behavior with your current version of TestStand by modifying the reportgen_atml.seq file. I have attached an example of how you might modify the reportgen_atml.seq file to correct this behavior to this post. Please note that this is simply an example of correcting the behavior and may not be the final implementation included in future versions of TestStand. I recommend that you do not overwrite or delete your current reportgen_atml.seq file and instead save the attached version to your <TestStand Public>\Components\Models directory.

 

Hope this helps. Thanks again for bringing this to our attention.

Manooch H.
National Instruments
Message 4 of 5
(4,753 Views)

Manooch,

 

Your modified version does indeed solve my issue. Just as a point of clarity, the modified reportgen_atml.seq needed to be put in the <TestStand Public>\Components\Models\TestStandModels directory instead of just <TestStand Public>\Components\Models.

 

Thanks!

0 Kudos
Message 5 of 5
(4,747 Views)