Hi Folks!

I still wasn't able to solve my problems with german umlauts (or more general: 
UTF-8 encoded characters) in the test-cases. But I've spend some days in 
research and come to some conclusions:

First:
The difference between the two test-runs, which made the one succeed and the 
other fail, did not lie in the different systems used, as I thought first 
(see: 
http://www.nabble.com/Strange-problem-with-german-umlauts-in-testcases-to16297404s2369.html#a16297404)
The testrun always fails, when I compile and run it from the console. It 
succeedes, when the application was compiled by eclipse (which I use as IDE 
with q4eclipse 0.4.0) and afterwards run the testcase from the console.

Second:
The problem does not show up on the web interface. Searching for german 
umlauts works there. Prehaps, this is because of the encoding-filter. I don't 
know. But UTF-8 encoded characters, which are returnd from static String 
variables inside the Java-code are not correctly shown!

To proof that, I boiled down my errors to a simple modification of the 
Hibernate-Tutorial, which I attached to this email.
The observations metntioned above were the same on all systems, I was able to 
test the code on.


I would be very thankfull, if anybody could run the attached example and 
verify or reject my problems, because I am going really insane on this 
problem...
If you are having the same problems like me, running "mvn test" would fail 
with 1 Failure, because the user with the last name "ä" wasn't found, and 
running "mvn jetty:run-war -Dmaven.test.skip=true" would show, that the UTF-8 
encoded "ä" in NameForm.toString() is printed wrong, while the user with the 
last name "ä" is found correctly.

You can easily see in the source, that the last name 'ä' is encoded correctly 
in src/test/java/org/appfuse/tutorial/dao/PersonDaoTest.java and 
src/test/resources/sample-data.xml, though the testcase saies it is'nt!


Thanks 

Kai Moritz

Attachment: german-umlauts.tar.bz2
Description: application/tbz

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to