Hello:
I’m having problems loading national characters into a grid, I get “Incorrect XML” messages even though I’m using CDATA and setting the header content type of the response to text/xml
…
response.setContentType(“Content-type:text/xml”);
…
My XML looks like this:
<?xml version='1.0' encoding='iso-8859-1'?>
If I remove the accent everything works fine.
What I am doing wrong?
Thanks in advance
Javier
Unfortunately the issue cannot be reconstructed.
Please make sure that coding type in your database suits to the coding in your xml
if issue still ocurs for you please provide a completed demo:
[url]Start DHTMLX Docs
Hello
Thanks for your help,
Trying to build up a demo case I have found that with somehow the string is not correctly read from the web page.
A System.out at servlet side produces this:
<?xml version='1.0' encoding='utf-8'?>
But from the HTML page we are reading this:
the database char set is set to AL32UTF8 so I have placed the xml enconding to utf8…
As an additional info:
If I use the “GridConnector” procedure using the c.render method with the same information (same sql sentence different where condition) works without problem and the accents are retrieved and shown without problem.
But I cannot use GridConnector in the application, since the SQL I have requires parameters from the html page, and I’m not allowed to use string concatenation in where clauses to avoid the danger of sql injection.
Therefore I have to use prepared statements and I have to assembly the xml in the servlet and sending it to the html page instead.
Any suggestion???.
Thanks in advance.
Javier
try to set the coding type in XML from utf8 to AL32UTF8.
Thanks for your answer, this apparently makes the accents appear right in the grid but the data stored in the database is different, so other applications are getting the wrong chars (see attached screenshot)
Is there any way to get on the grid the same information that gets stored in the database.
As I explained before when using DatabaseConnector both information were exactly the same.
Best regards.
Javier