mixing encodings is a very bad idea.

Remember encodings are not only used to serve files to the client
But also to read values back in!
Because a browser sends the request in the encoding that that page was in
But a browser doesn't let us know that (through a header or what ever which would be very handy)

So if you are mixing outputs.. Then when a request comes in. What should we use to parse the parameters??
You have no idea where he could come from
You could say what i used the last time. But that is not really workable with a back button....

johan


Stefan Lindner wrote:
Dear Juergen,

my problem is solved. The reason was that I have a link from a
non-ISO88591-page to a ISO88591-page.
Setting the response-encoding via

        
getApplicationSettings().setResponseRequestEncoding("ISO-8859-1");

has no immedaiate effetct. The encoding is permanently changed from
UTF-8 to ISO-8859-1 but this
helps only when I re-desply the IOS88591-page because now the the
request encoding is also ISO88591.
There seems to be a problem, when the encodeing is changed during 2
pages.
I try to strip down the case to a few words:
1. page1.html has UTF-8 encoding and links to page2.html
2. page2.html contains some wickt markup an has ISO-8859-1 encoding.
3. page3.html has ISO-8859-1 encoding
4. Start from page1 and navigate to page2: ISO-characters are displayed
wrong
5. Start from page3 and navigate to page2: ISO-characters are displayed
correctly.

Once again: my problem is solved now, I use the same ncoding for all
files but maybe there is a problem
with wicket's internal encoding handling.

Stefan
        

From: Juergen Donnerstag <[EMAIL PROTECTED]>
To: [email protected]
Subject: Re: [Wicket-user] Character encoding problem
Reply-To: [email protected]

Yes, something has changed compared to the wiki entry: The response
(and request) encoding is no longer determined by the page's markup
xml declaration (<?xml..), it is now an appication setting
set/getResponseRequestEncoding(). The reason why we changed it is
described here
http://www.crazysquirrel.com/computing/general/form-encoding=.jspx).
But I have the impression that this is not your problem. I assume your
markup (page as well as panels and borders etc.) contain a <?xml
encoding=3D".."?> xml declaration? Wicket will use the encoding this
information while reading (FileReader) the markup file. Thus, if the
encoding is ISO-8859-1 your text editor should save the file in
iso-8859-1 encoding. Similiar, if your encoding is UTF-8 you must make
sure the file's content is realy saved utf-8 encoded. Usually only XML
editors automatically read the <?xml?> and save the file with the
proper encoding. Most text editors (and IDEs) must be explicitly told
which encoding to use (save as dialog, or file properties, ... that
realy depends on the editor you are using)


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to