Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Importing DCRs
mangetak
Hi,
We are developing DCRs with an external application and after this, we upload them to TeamSite, and give them extended attributes so we can edit them as forms. It all works perfect but have a problem with XML encoding definition.
We create our XML with a <?xml version="1.0" encoding="ISO-8859-1"?> heading.
The problem is that we import hundreds of XML, and try to generate pages but get an error:
sun.io.MalformedInputException
at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:147)
at java.io.InputStreamReader.convertInto(InputStreamReader.java:132
And other errors as :
Caused by: org.xml.sax.SAXParseException: The entity "nbsp" was referenced, but not declared.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
If we go to the DCR-open-saveit, then the heading is automatically changed to <?xml version="1.0" encoding="UTF-8"?> and we can generate properly.
Do we have to open-save our DCR one by one or is there any way of transforming our DCR to UTF-8?
Thanks in advance
Find more posts tagged with
Comments
Migrateduser
Arue you sure that it's the encoding that's the problem - the error you supplied indicates that you have whitespace entities ( 
somwhere where you're not suppoed to have them. What happens with them when you 're-save' the DCR?
Perhaps you need to put them inside <[CDATA[ ]]> tags during generation of the files.
# martin
bodo
Hello,
we encountered problems when we changed from 5.5.2 to 6.1. You can assure your encoding by use this in a perl script:
#UTF-8 Encoding
$filecontent = ($doc->toString);
$filecontent = encode("UTF-8", $filecontent);