<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Meddelande</TITLE>
<META content="MSHTML 6.00.2800.1264" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=258353023-28102003><FONT face=Arial color=#0000ff
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=258353023-28102003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=258353023-28102003><FONT face=Arial color=#0000ff size=2>Ok,
this sounds like a linux jvm problem. Which character encoding are you
using?</FONT></SPAN></DIV>
<DIV><SPAN class=258353023-28102003><FONT face=Arial color=#0000ff size=2>Which
XMLOutputter method are you using?</FONT></SPAN></DIV>
<DIV><SPAN class=258353023-28102003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=258353023-28102003><FONT face=Arial color=#0000ff size=2>As for
the &eacute; stuff, JDOM doesn't do entity "roundtripping". The eacute
entity</FONT></SPAN></DIV>
<DIV><SPAN class=258353023-28102003><FONT face=Arial color=#0000ff size=2>is
defined in the XHTML dtd but is converted by the SAX parser before it reaches
the</FONT></SPAN></DIV>
<DIV><SPAN class=258353023-28102003><FONT face=Arial color=#0000ff
size=2>SAXBuilder/SAXHandler. If the encoding in effect does not "support" a
character</FONT></SPAN></DIV>
<DIV><SPAN class=258353023-28102003><FONT face=Arial color=#0000ff
size=2>directly, it is written as a character reference, &#xNNNN;. The only
entities generated</FONT></SPAN></DIV>
<DIV><SPAN class=258353023-28102003><FONT face=Arial color=#0000ff size=2>by
JDOM is &lt;, &gt; and &amp;, which are predefined in the XML
specification.</FONT></SPAN></DIV>
<DIV><SPAN class=258353023-28102003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=258353023-28102003><FONT face=Arial color=#0000ff
size=2>/pmn</FONT></SPAN></DIV>
<DIV><SPAN class=258353023-28102003></SPAN> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=sv dir=ltr align=left><FONT face=Tahoma
size=2>-----Ursprungligt meddelande-----<BR><B>Från:</B> manish sharan
[mailto:manish.sharan@divlogic.com] <BR><B>Skickat:</B> den 29 oktober 2003
00:14<BR><B>Till:</B> Per Norrman; jdom-interest@jdom.org<BR><B>Ämne:</B> Re:
[jdom-interest] encoding problem linux vs windows<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hi </FONT></DIV>
<DIV><FONT face=Arial size=2>I am running my program on Linux and Windows and
then bringing over the result to my winodws folder where I open it with
Notepad.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The output from the Windows is ok while the
output from Linux has the ? in place of &eacute;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Obviously , this has nothing to do with JDOM per
se but more to do with differences in character encoding schemes
etc. between Linux and Windows. Can someone please
point me to a knowledge resource that can help me figure it out ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-manish</FONT></DIV>
<DIV><FONT face=Arial size=2>ps: on another note , JDOM Ouputter
converts "&eacute;" in my xhtml to "é"
. I havent tested it with other HTML entirties but Is this a known bug
?</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=pernorrman@telia.com href="mailto:pernorrman@telia.com">Per
Norrman</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=manish.sharan@divlogic.com
href="mailto:manish.sharan@divlogic.com">'manish sharan'</A> ; <A
title=jdom-interest@jdom.org
href="mailto:jdom-interest@jdom.org">jdom-interest@jdom.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, October 28, 2003 4:54
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> SV: [jdom-interest] encoding
problem linux vs windows</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=490005021-28102003><FONT face=Arial color=#0000ff
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=490005021-28102003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=490005021-28102003><FONT face=Arial color=#0000ff size=2>My
guess is that the problem is not with JDOM or Java or the
platform,</FONT></SPAN></DIV>
<DIV><SPAN class=490005021-28102003><FONT face=Arial color=#0000ff
size=2>but with the editor/viewer/console (whatever), i.e. the
application that you use</FONT></SPAN></DIV>
<DIV><SPAN class=490005021-28102003><FONT face=Arial color=#0000ff size=2>to
look at the result. How do you determine the problem? If you transfer the
linux </FONT></SPAN></DIV>
<DIV><SPAN class=490005021-28102003><FONT face=Arial color=#0000ff
size=2>result to windows, is the problem still there?</FONT></SPAN></DIV>
<DIV><SPAN class=490005021-28102003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=490005021-28102003><FONT face=Arial color=#0000ff
size=2>/pmn</FONT></SPAN></DIV>
<DIV><SPAN class=490005021-28102003></SPAN> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=sv dir=ltr align=left><FONT
face=Tahoma size=2>-----Ursprungligt meddelande-----<BR><B>Från:</B> <A
href="mailto:jdom-interest-admin@jdom.org">jdom-interest-admin@jdom.org</A>
[mailto:jdom-interest-admin@jdom.org] <B>För </B>manish
sharan<BR><B>Skickat:</B> den 28 oktober 2003 21:49<BR><B>Till:</B>
jdom-interest@jdom.org<BR><B>Ämne:</B> [jdom-interest] encoding problem
linux vs windows<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hi</FONT></DIV>
<DIV><FONT face=Arial size=2>I am using JDOM to process an XHTML page. The
problem is with html entities such as &nbsp; and
&eacute;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>On Windows , it handles them without
problem. On Linux RH AS 2 , it turns them into '?' . I am
using sun jdk 1.4.2 on both.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Can anyone please tell me what could be the
problem ? Why is it behaving differently on Linux ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial
size=2>-manish</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>