Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

PCDATA invalid Char value error when importing


Hi, I am doing an evaluation of Test Rails for my company as we are considering switching.

I’m trying to do an import, and I get this error:

PCDATA invalid Char value 24 PCDATA invalid Char value 19 PCDATA invalid Char value 24 PCDATA invalid Char value 26 PCDATA invalid Char value 19 PCDATA invalid Char value 1 …

Any help would be greatly appreciated as we’d like to prove that we can import our existing test cases and see how it looks in Test Rail as part of our eval.




Thanks for your posting. This looks like an issue with the format or encoding of the XML file you are trying to import. We are happy to take a look at the XML file if you could send it to our help desk:



Thanks for the reply. I think I was able to fix this using a preg_replace to strip out all the non-printable acsii that somehow was in the XML. We’ll see, as right now I have been working with smaller batches of test cases so I can verify that they are all imported. When I do it in bulk, the XML ends up with 50 more cases than I actually have, and those obviously aren’t valid.



Thanks for the update. If this is an encoding issue (Unicode characters), we recommend using the UTF-8 encoding for the XML files (and ideally implement this as part of the migration process). If you are generating XML files based on CSV files, for example, it’s best to convert/encode the CSV to/as UTF-8 and then generate the UTF-8 XML files afterwards.