ODATA: An invalid character was found in the text content


I am trying to publish a table with OData.
The database is FirebirdSQL with CHARSET NONE
Some records containing values with non-Latin characters.

When this data is serialized at the client’s request, an exception is raised with the message “An invalid character was found in the text content.”.

Is there any way to intercept the record or values that caused this situation so that it can be identified without making changes to the DataAbstract classes?

Tiberiu Stoicescu


try to pass your data to DA server with UTF8 encoding (data and correspondent http header).

I don’t know if I understood correctly what you recommended me to do.

I have a SQL in TDASchema and the data is published with TDAODataSchemaDispatcher.
The data is entered into the database by another application.

I tried several variants of the database connection string, such as:



Nothing seems to change.
In order to be able to identify which data caused the problem, I modified the method
TROMSXMLNode.SetValue(const Value: Variant); but I don’t think it’s a good option.


can you show your OData request that causes this error, pls?
you can drop email to support@ for keeping it in privacy.