D
design4future
Hello newsgroup.
At the moment i am programing an AJAX-Application. This program fetchs
an XML from an perl script via xmlhttprequest.
The xml-content (not the fieldnames) can contain special chars like
german umlauts (äöü), french special chars... or "HTML-Tags"
maybe the content is a html-structure and contains chars like ">".
Now my question:
How can i convert the text in perl to an parseable structure for
Javascript.
Should i use the Javascript function "decodeURI"? But with shich
Perl-Function / Module should I convert the strings then?
At the moment i send an "xml"-header with CGI::header and the first
line of the xml is
<?xml version="1.0" encoding="iso-8859-1"?>
Is that OK?
When I convert all the special chars to their entinities
(HTML::Entities) there is an problem with the "&".
Then there is an parse Error in Javscript and the page leaves blank.
I have also tried to convert the already converted Entities (e.g.
ü to the "url-mode" (%XXuuml, but then it is not possible to
convert it back
Is it necessary to include an DTD in this case?
How can i solve the problem?
Thanks for any help or suggestion
At the moment i am programing an AJAX-Application. This program fetchs
an XML from an perl script via xmlhttprequest.
The xml-content (not the fieldnames) can contain special chars like
german umlauts (äöü), french special chars... or "HTML-Tags"
maybe the content is a html-structure and contains chars like ">".
Now my question:
How can i convert the text in perl to an parseable structure for
Javascript.
Should i use the Javascript function "decodeURI"? But with shich
Perl-Function / Module should I convert the strings then?
At the moment i send an "xml"-header with CGI::header and the first
line of the xml is
<?xml version="1.0" encoding="iso-8859-1"?>
Is that OK?
When I convert all the special chars to their entinities
(HTML::Entities) there is an problem with the "&".
Then there is an parse Error in Javscript and the page leaves blank.
I have also tried to convert the already converted Entities (e.g.
ü to the "url-mode" (%XXuuml, but then it is not possible to
convert it back
Is it necessary to include an DTD in this case?
How can i solve the problem?
Thanks for any help or suggestion