Sorry. I did reply to soon. I do run into the same problems! I'll have a
look at it later on.
regards
Kropp, Henning schrieb:
Dear Kai,
I was able to run your example with no problem at last. The reason why
you test fails is, as said early your sample-data.xml file is not
utf-8 encoded. To be clear, its not a matter of changing the xml
directive its a matter of *real* file encoding.
If you encode your sample-data.xml in utf-8 with iconv
(http://rzaix12.rrz.uni-hamburg.de/doc_link/C/a_doc_lib/cmds/aixcmds3/iconv.htm)
your test should work just fine.
Be aware that uploading, downloading files over the network might
change the file encoding again.
regards
Kai Moritz schrieb:
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
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]