> Usually the root cause is that <?xml encoding=".."?> does not match
 > the encoding which was used to store the markup file.

That was not the case here. Charset was OK with xml declaration but 
layout was not. Layout was OK without declaration, but charset was not.

application.getMarkupSettings().setStripXmlDeclarationFromOutput(true)

seems to be the best solution !

Thanks !

Pierre-Yves

Juergen Donnerstag a écrit :
> Usually the root cause is that <?xml encoding=".."?> does not match
> the encoding which was used to store the markup file.
> 
> application.getMarkupSettings().setStripXmlDeclarationFromOutput(false)
> removes the XML decl from the output to the browser.
> 
> Juergen
> 
> On 8/1/06, Pierre-Yves Saumont <[EMAIL PROTECTED]> wrote:
>> Hi Johan,
>>
>> Very good advice indeed ! It appears (from
>> http://hsivonen.iki.fi/doctype/) that :
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>>
>> switches IE6 in "almost standard" mode but
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>>
>> switches it in quirk mode !!!
>>
>> I can't imagine any reason for this, but I quite surely can imagine a
>> lot of reasons why Microsoft made it that way !
>>
>> According to this document(http://hsivonen.iki.fi/doctype/), there are
>> simply NO WAY to put IE6 in (almost) standard mode if an xml declaration
>> is present. And believe me, in my case, the difference between the two
>> modes is huge !
>>
>> Hopefully, I had this whole thing working in ISO-8859-1 without the xml
>> declaration !
>>
>> Pierre-Yves
>>
>> Johan Compagner a écrit :
>> > We should look at that loading problem then. Because we should read it
>> > right.
>> >
>> > About that CSS in IE6 this is quirks mode or not. Please do a search 
>> for
>> > that
>> > if you don't put that declaration in IE6 , IE doesn't really comply to
>> > the CSS rules
>> > (just look at the same css page in FF and IE without the declaration.)
>> >
>> > johan
>> >
>> >
>> > On 8/1/06, *Pierre-Yves Saumont* < [EMAIL PROTECTED] <mailto:[EMAIL 
>> > PROTECTED]>>
>> > wrote:
>> >
>> >     Thanks for the information. However, it appears that saving the
>> >     files in
>> >     the correct encoding, is not enough. One must also start Java 
>> with the
>> >     correct encoding. I am using Wicket with JBoss (ie Tomcat) under 
>> Win
>> >     XP/Java 5 for development and Linux/Java 5 for testing (and, who 
>> knows,
>> >     maybe some days for production...)
>> >
>> >     If the files are saved in ISO-8851, it works fine under Win XP 
>> but not
>> >     under Linux (no way : I have tried every combination of 
>> <meta...>, <?xml
>> >     ...> and browser configuration.
>> >
>> >     If I just add -Dfile.encoding=ISO-8859-1 to the java command line
>> >     parameters, then everthing run fine.
>> >
>> >     The same is true in the other direction : if the files are saved in
>> >     UTF-8, it won't run under Win XP unless Java is started with
>> >     -Dfile.encoding=UTF-8
>> >
>> >     BTW: it also noticed that adding <?xml...> at the begining of 
>> the page
>> >     breaks the CSS layout in IE6 (many other things break CSS layout in
>> >     IE6 !)
>> >
>> >     This may be specific to my settings. I hope this can help those who
>> >     have
>> >     character set problems.
>> >
>> >     Pierre-Yves
>> >
>> >
>> >     Juergen Donnerstag a écrit :
>> >      > Wicket completely ignores <meta http-equiv="Content-Type"
>> >      > content="text/html; And because no editor, maybe
>> >      > except good htm editors, ignore the tag as well, it is 
>> completely up
>> >      > to you to save the file in the correct encoding. I personally 
>> prefer
>> >      > <?xml ... encoding="..."?> as almost all XML editors (including
>> >      > eclipse) handle it correct (save the file in the proper 
>> formatting)
>> >      > and, that is important as well, Wicket uses it to determine the
>> >      > encoding of the file while reading it. Otherwise Wicket 
>> refers to
>> >     the
>> >      > default encoding of your PC. Note: it is only used to read 
>> the file.
>> >      > WIcket removes the <?xml > from the markup and inserts its 
>> own, with
>> >      > the encoding as defined for the Wicket Application (see 
>> ISettings).
>> >      > This approach has proven to be working very well and there are
>> >      > numerous discussions in the various archives why we are doing 
>> it that
>> >      > way in case you are interested.
>> >      >
>> >      > Juergen
>> >      >
>> >      >> On 7/29/06, Pierre-Yves Saumont <[EMAIL PROTECTED]
>> >     <mailto:[EMAIL PROTECTED]>> wrote:
>> >      >> Hi,
>> >      >>
>> >      >> I am new in using Wicket, but I had this problem with all the
>> >     Frameworks
>> >      >> I used before.
>> >      >>
>> >      >> In Wicket, it was absolutely no problem since I just added :
>> >      >>
>> >      >> <meta http-equiv="Content-Type" content="text/html;
>> >     charset=iso-8859-1">
>> >      >>
>> >      >> in the HTML template to make it work. It seems Wicket 
>> managed this
>> >      >> transparently.
>> >      >>
>> >      >> Please correct me if I am wrong.
>> >      >>
>> >      >> Pierre-Yves
>> >      >>
>> >      >> PS: I am however still having a problem with one character 
>> that is
>> >      >> fréquently used in french and does not exist in iso-8859-1 
>> (the oe
>> >      >> ligature). Can anybody tell me what is the best place in 
>> Wicket to
>> >      >> implement a filter that would replace this character with 
>> the html
>> >      >> entity &oelig; ?
>> >      >>
>> >      >> JK a écrit :
>> >      >> > Hello again, Problem was with
>> >      >> >     setResponsePage( ThankYou.class,parameter);
>> >      >> > and parameter (PageParameters) encoding.
>> >      >> >
>> >      >> > Code for setting default encoding (ok?):
>> >      >> > ---------- WebApplication
>> >      >> >
>> >      >> > protected void init()
>> >      >> > {
>> >      >> >       
>> getMarkupSettings().setDefaultMarkupEncoding("iso-8859-1");
>> >      >> > }
>> >      >> >
>> >      >> > 2006/7/27, JK < [EMAIL PROTECTED] 
>> <mailto:[EMAIL PROTECTED]>>:
>> >      >> >> Hi,
>> >      >> >>
>> >      >> >> How do you change character encoding from utf-8 to
>> >     iso-8859-1? If I
>> >      >> define
>> >      >> >> ----------
>> >      >> >> protected void configureResponse() {
>> >      >> >>   super.configureResponse();
>> >      >> >>
>> >      >> >>   final WebResponse response =
>> >     getWebRequestCycle().getWebResponse();
>> >      >> >>   response.setHeader("Content-Type", "text/html;
>> >     charset=iso-8859-1");
>> >      >> >> }
>> >      >> >> ----------
>> >      >> >> for WebPage subclass, component MultiLineLabel still has 
>> wrong
>> >      >> encoding (utf-8).
>> >      >> >>
>> >      >> >
>> >      >> >
>> >      >>
>> >     
>> -------------------------------------------------------------------------
>> >      >> > Take Surveys. Earn Cash. Influence the Future of IT
>> >      >> > Join SourceForge.net's Techsay panel and you'll get the 
>> chance to
>> >      >> share your
>> >      >> > opinions on IT & business topics through brief surveys -- and
>> >     earn cash
>> >      >> >
>> >      >>
>> >     
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >     
>> <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> 
>>
>> >      >> > _______________________________________________
>> >      >> > Wicket-user mailing list
>> >      >> > Wicket-user@lists.sourceforge.net
>> >     <mailto:Wicket-user@lists.sourceforge.net>
>> >      >> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >      >> >
>> >      >> >
>> >      >> >
>> >      >>
>> >      >>
>> >      >>
>> >     
>> -------------------------------------------------------------------------
>> >      >> Take Surveys. Earn Cash. Influence the Future of IT
>> >      >> Join SourceForge.net's Techsay panel and you'll get the 
>> chance to
>> >      >> share your
>> >      >> opinions on IT & business topics through brief surveys -- and
>> >     earn cash
>> >      >>
>> >     
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >     
>> <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> 
>>
>> >      >> _______________________________________________
>> >      >> Wicket-user mailing list
>> >      >> Wicket-user@lists.sourceforge.net
>> >     <mailto:Wicket-user@lists.sourceforge.net>
>> >      >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >      >>
>> >      >
>> >      >
>> >      >
>> >
>> >
>> >     
>> -------------------------------------------------------------------------
>> >     Take Surveys. Earn Cash. Influence the Future of IT
>> >     Join SourceForge.net's Techsay panel and you'll get the chance to
>> >     share your
>> >     opinions on IT & business topics through brief surveys -- and 
>> earn cash
>> >     
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >     
>> <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> 
>>
>> >     _______________________________________________
>> >     Wicket-user mailing list
>> >     Wicket-user@lists.sourceforge.net
>> >     <mailto:Wicket-user@lists.sourceforge.net>
>> >     https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> >
>>
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to 
>> share your
>> opinions on IT & business topics through brief surveys -- and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> 
> 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to