[jdom-interest] XHTML issues

Rachel Greenham rachel at linuxgrrls.org
Fri Jul 25 00:37:38 PDT 2003


Jason Hunter wrote:
> Yes, but a more complete answer is you want to just include these 
> characters as regular Unicode characters.  Then if you output with UTF-8 
> they'll write directly without needing to be escaped.  If you output in 
> ASCII or 8859-1 then the default escape strategy will handle their 
> escaping for you.  Only if you're using a funky encoding will you need 
> to worry about setting up an escape strategy.

Yes, including the characters directly and outputting with UTF-8 does 
work, even just on -b9 (as long as you created your OutputStreamWriter 
using the right encoding), no need for latest-CVS. I simply have a 
*preference* for defining them as entities, either named or numerical, 
and keeping the XHTML source 7-bit clean. I know HTTP is guaranteed 
8-bit safe, and browsers should cope, but I also want it to be readily 
viewable in any text editor, specifically nedit in my case, which 
doesn't have UTF-8 awareness.

... having said that it's possible UTF-8 is better supported in older 
browsers than HTML4 entities, so it may be better to do it that way anyway.

-- 
Rachel




More information about the jdom-interest mailing list