web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

DMF - Misleading error log in xml importing?

(0) ShareShare
ReportReport
Posted on by 210

Hello folks,

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 [...]":

04_2D00_11_2D00_2019-11_2D00_08_2D00_03.png

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

Gian Paolo

I have the same question (0)
  • Gian Paolo Dell Erba Profile Picture
    210 on at
    RE: DMF - Misleading error log in xml importing?

    Hello Martin,

    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.

    Gian Paolo

  • Martin Dráb Profile Picture
    235,814 Most Valuable Professional on at
    RE: DMF - Misleading error log in xml importing?

    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.

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: DMF - Misleading error log in xml importing?

    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"?>

  • Gian Paolo Dell Erba Profile Picture
    210 on at
    RE: DMF - Misleading error log in xml importing?

    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.

    Gian Paolo

  • Gian Paolo Dell Erba Profile Picture
    210 on at
    RE: DMF - Misleading error log in xml importing?

    PS Where can I find some setup / parameter that shows what's the input encoding for xml files in Dynamics?

  • André Arnaud de Calavon Profile Picture
    297,231 Super User 2025 Season 2 on at
    RE: DMF - Misleading error log in xml importing?

    Hi Gian,

    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.

  • Gian Paolo Dell Erba Profile Picture
    210 on at
    RE: DMF - Misleading error log in xml importing?

    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":

    04_2D00_11_2D00_2019-14_2D00_56_2D00_47.png

    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.

  • Martin Dráb Profile Picture
    235,814 Most Valuable Professional on at
    RE: DMF - Misleading error log in xml importing?

    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).

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: DMF - Misleading error log in xml importing?

    I would start by checking the rejected files and comparing to non-rejected. Then you should be able to understand what causes the issue.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 665 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 595 Most Valuable Professional

#3
Yng Lih Profile Picture

Yng Lih 558

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans