In the past, I had problems when the character set encoding passed to the Java 
compiler was different in different environments.  In our case, we were 
compiling in the ant script with an explicit declaration that the source files 
were encoded in iso-8859-1, but sometimes we omitted that encoding argument in 
the ant scripts, and then the compiler interpreted constants as UTF-8 instead 
of the iso-8859-1 in which they were actually encoded in our files.
 
You might try performing the same compile steps as Jenkins uses, but do them in 
a command line environment instead of doing them inside Jenkins.  If they fail 
the same way in your command line environment, then it may be a character set 
encoding difference in the build environment (like I had), rather than a 
difference in the test or runtime environment.
 
Mark Waite


>________________________________
> From: Sebastian Kwiatkowski <sebastian.e.kwiatkow...@googlemail.com>
>To: jenkinsci-users@googlegroups.com 
>Sent: Saturday, May 12, 2012 8:07 PM
>Subject: Unit test with unicode character passes in IntelliJ, but fails using 
>Jenkins.
>  
>
>Hello,
>
>
>I'm trying to build a Java project with Jenkins 1.463 on Windows. One unit 
>test source code file contains the right single quotation mark (u+2019). When 
>I run the test in IntelliJ, it passes. However, when the test is ran as part 
>of the Jenkins build process, it fails:
>
>
>junit.framework.ComparisonFailure: expected:<[’]> but was:<[’]>
>
>
>
>The expected value in the code is this:
>private String UnescapedRightSingleQuotationMark = "’";
>
>
>
>I have not changed any Jenkins settings other than paths to the JDK and 
>Maven. The unit testing framework is JUnit 4.10.
>
>
>Do I have to change some settings related to file encoding?
>
>
>I would appreciate your help.
>
>
>
>
>
>Thank you,
>
>
>Sebastian Kwiatkowski
>
>
>
>   

Reply via email to