Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, Power Apps, Power Automate, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | View virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
I'm dealing with a strange occurrence in data integration. In our scenario, customer's business data come in Dynamics through a import recurring data job that uses a custom data entity. The files have a xml format, and some of them (actually, a lot) lately are being rejected by Dynamics with the message "Invalid character in the given encoding [...]":
We examinated the file itself and it looks like there are no problems with invalid characters or encoding. Could it be a misleading log? What can you recommend to deal with it?
Thank you very much
I would start by checking the rejected files and comparing to non-rejected. Then you should be able to understand what causes the issue.
I would slightly correct your statement. You said that "there are no problems with invalid characters or encoding", but the message says something else. It's not about invalid encoding nor a character invalid in general, but about a character invalid in the context of the given encoding.
Does the XML header matches the actual character encoding of the file, and do they match the encoding used for the import?
What's the encoding and what character do you have at position 98772? Note that the character may not be visible (control characters) or distinguishable from valid characters (e.g. different kinds of spaces or Greek question mark character looking exactly as semicolon).
Hello both of you!
@Nikolaos - A person from the technical team did that but from what he saw he can tell there's no significant difference - the cause may be of course a particular character which is currently unknown
@Martin - The encoding used for the import is ISO 8859-1. Files use the same encoding and, in this particular occurrence, the character in that position is a zero > "0":
We're checking other files which are suffering from the same issue to see if there's some repetition in reported characters by DMF error messages.
Do other XML files which did succeed also have the value '0'? It might also be a not accepted value due to a field validation.
PS Where can I find some setup / parameter that shows what's the input encoding for xml files in Dynamics?
Well it turned out that error messages point out to (seemingly) random characters. Still searching for a path to follow... I was wondering if it's possible to check what's the input encoding for xml files in Dynamics - a setup somewhere? I can't find it.
The encoding is set up in your xml file's header. Please check that the declaration there matches the actual encoding of the file.
The first line of the file is usually something like this:
<?xml version="1.0" encoding="utf-8"?>
As I mentioned, not all characters must be visible and what looks like a zero may be a different character with the same visualization. I would check it at byte-level to be sure. Or you can manually overwrite the data with something you know. I've seen similar cases before, when people copied and pasted text from other sources.
You can also try to proces the file through a simple console application (e.g. load it to XmlDocument in C#). Maybe you'll get the same error and you'll have a much simpler test case and you'll know it's not a bug in AX. Or it'll work and you'll know that the file is fine and the problem lies somewhere in AX logic.
I tried some xml validation tools and they said the files are correct... What's even stranger is that the system imports without any error or message the same files, when the import is executed with a simple one-shot data project. So I'm guessing the problem lies in the interface.
Business Applications communities