Jan, the current implementation copies the <?xml?> from the page's markup to the output. It is used to determine the encoding of the markup file and in case of the Page the encoding of the output. In case any of the remaining component's contains <?xml?> it is used to determine the encoding of the markup only and character are automatically converted into the output encoding.
Having sad that, I think there is currently no solution to not copy it to the output. Additional comments please see below. On 7/6/05, Jan Bares <[EMAIL PROTECTED]> wrote: > Hi, > > we would like to produce pages in utf-8 encoding. This works fine if the > <?xml version="1.0" encoding="UTF-8"?> is in the source markup. However the > rendered pages should not contain the <?xml?> declaration. This is due to > quirk/standard mode of IE. XML standard says, that if a XML file doesn't > have the <?xml?> declaration, it is assumed to be coded in utf-8. > > Can you help me with this problem? I see several solutions: > > 1. Set the output encoding for each page - I would like to avoid this > solution this is possible, but doesn't prevent wicket from copying <?xml?> from page markup to output. > 2. Remove the <?xml?> declaration from output - how can I do this? I don't think there is solution available right now. > 3. Can I tell to Wicket configuration that all markup pages are in utf-8? If no <?xml?> is available Wicket uses the values inherited from the OS (the current process), provided you have not changed Wickets default locale by means of settings.setDefaultLocale(). Though I'm not sure (I haven't tested it), that we are using these default locale for markup files as well. Could you do me a favour and test that? Thanks a lot. > 4. If the XHTML DOCTYPE is present and no <?xml?> declaration is found, use > utf-8 as default > Honestly, I do not like this kind of "magic". To "complex" and you end up with lots of these "exceptions". In case you haven't read it already http://wicket.sourceforge.net/wiki/index.php/Markup_encoding. I guess it does not answer your questions, but may give you some more hints. Juergen ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
