I thought that Maven simply compiles the source file to a class file, so it's one chance for re-encoding.

I'm not so good at Linux internals. Is there another variable or setting that I could check?
If you encode/decode one too many times you could get some weird
behavior, like Ü(default)->  Ü(utf8) ->  Ü(utf8)(utf8) and this one
could be unreadable.

Does both shell/java read that variable? As I remember those
parameters, $LANG, could be used differently on different
linus-dists...

Cheers,
Per

On Mon, Oct 18, 2010 at 11:39 PM, Andreas Simon<andreas.si...@gmx.de>  wrote:
The application is not internationalized, so I don't use property files in
the test code or tested code.

The $LANG variable is de_DE.utf8 on both machines.

Sorry, I didn't catch your last point.

Am 18.10.2010 23:30, per-henrik hedman wrote:
Are you using property files in resources? Those could be stored
differently.

What are your default encoding on your machines? It could be that some
of the behavior, eg the different configurations that you are using
aren't used and then it falls back to default behavior.

Another thing can be that your are encoding an extra time, and that
could make that kind of weird behavior...

Good luck,
Per


On Mon, Oct 18, 2010 at 11:11 PM, Andreas Simon<andreas.si...@gmx.de>
  wrote:

I verified the source code and the test code file with Linux' file
command.
Both are identified as "UTF-8 Unicode Java program text". I checked on
the
failing SuSE system.

Am 18.10.2010 22:54, Anders Hammar wrote:

Have you verified that all Java files involved are in fact using UTF-8
char
encoding (check on the machine where it fails!)? Check both source code
and
test code files.
I don't think it's obvious that the are compiled with different
encodings.
The problem could maybe be that they are retrieved from your scm (or
stored
in the scm) with the wrong encoding.

/Anders

On Mon, Oct 18, 2010 at 22:30, Andreas Simon<andreas.si...@gmx.de>
  wrote:



Thank you for your reply!

On my developer machine is Ubuntu 10.04. Same result when running
Oracle
JDK 1.6.0u21.

  What are you running on your developer machine? Can you run it with
Oracle


JDK?

Cheers,
Per Hedman

On Mon, Oct 18, 2010 at 8:51 PM, Andreas Simon<andreas.si...@gmx.de>
  wrote:




Hi all,

I got a quite strange problem with my tests. I have 3 tests that
shall
control some messages for the user. These messages contain some
German
umlauts (ä, ö, ü and ß). On my Ubuntu developer machine the tests run
fine.
On my SuSE integration server the tests fail. The assertions fail
with
the
following message:

   expected:<...ü...>       but was:<...??...>

Obviously, the test files and the tested file are compiled with
different
encodings.

I have tried several settings with UTF-8,

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<executions>
<execution>
<id>src-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>1.5</source>
<target>1.5</target>
<encoding>UTF-8</encoding>
<fork>true</fork>
<inputEncoding>UTF-8</inputEncoding>
<outputEncoding>UTF-8</outputEncoding>
<argLine>-Dfile.encoding=utf8</argLine>
</configuration>
</execution>
<execution>
<id>default-compile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<source>1.5</source>
<target>1.5</target>
<encoding>UTF-8</encoding>
<fork>true</fork>
<inputEncoding>UTF-8</inputEncoding>
<outputEncoding>UTF-8</outputEncoding>
<argLine>-Dfile.encoding=utf8</argLine>
</configuration>
</execution>
</executions>
<configuration>
<source>1.5</source>
<target>1.5</target>
<encoding>UTF-8</encoding>
<fork>true</fork>
<inputEncoding>UTF-8</inputEncoding>
<outputEncoding>UTF-8</outputEncoding>
<argLine>-Dfile.encoding=utf8</argLine>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compile.encoding>UTF-8</maven.compile.encoding>
</properties>

Some settings are redundant, but two are better than one. Any way,
these
settings don't apply to the compiling of the test files. I have
searched
some hours for similar problems, but I found no other solution. To be
complete, my configuration:

  SuSE 11.1
  IBM JDK 1.5.0
  Maven 2.2.1


Thanks for any idea,
Andreas





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to