XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] CDATA Section from JSP/ATG Dynamo

On 9/5/07, frank <frank@therichards.org> wrote:
> I'm trying to serve an RSS feed from Websphere and the ATG suite of web
> server apps. Since I have the kind of users that can and do put
> Windows-1252 characters into UTF-8 documents, I really need to wrap the
> output in CDATA sections.
> I can find nothing in either the Websphere or ATG docs that even
> mentions CDATA. The one or two throwaway mentions I've found in general
> JSP documentation say that the literal '<![CDATA[' should just plain work.
> Actually it vanishes without a trace. There are no errors, just no CDATA
> section. I'm very reluctant to put effort into a SAX or DOM
> implementation without knowing why a simple string doesn't work.
> Can anyone provide either enlightenment or a workaround?

From this and your previous post it suggests that you're not quite
"getting" how encoding works at the moment (which is no bad thing,
it's really non-intuitive).

You can't put "Windows-1252" characters into UTF-8 document" - you can
only write write/read in different encodings, which is what I suspect
you're doing.

Wrapping sections in CDATA, or as you said in your previous post
adding steps in the processing pipeline to fix encoding problems isn't
the solution, just patching over the problem.

It's highly likely that the platform default encoding is Windows-1252
(as in the default write encoding), and the XML prolog is UTF-8.  Make
sure the two match and everything will be fine.

-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS