Lukas Theussl <[EMAIL PROTECTED]> writes: > String expect = "Français";
IMHO you are barking at the wrong tree. As long as you have non-US-ASCII characters in the Java source code, all bets are off. The compiler interprets the contents of the source file according to its own language preferences. man javac(1), look for "-encoding". Just work around this by adding maven.compile.encoding = ISO-8859-1 to the project.properties. Trying to second guess the platform encoding will lead you nowhere. Without this line, the tests still fail. Using UTF-8 locale, Java tries to interpret the c-cedille as Unicode and the match fails. You will still put a "gotcha" in. If someone opens the source code file with an unicode based editor, the character will be unreadable and if he changes it to a correct UTF-8 c-cedille (can you spell emacs?), then the tests will fail _again_. So replace the c-cedille with a \xxx sequence. Can't tell you the right value from the top of my head, though. This is what we got for not making UTF-8 compatible to ISO-8859-1. Regards Henning > String result = LocaleUtil.displayName(locale, locale); > try { // Convert from Unicode to UTF-8 > String string = "Fran\u00e7ais"; > byte[] utf8 = string.getBytes("UTF-8"); > expect = new String(utf8, "UTF-8"); > } catch (UnsupportedEncodingException e) { > } > assertEquals(result, expect); > } >Can you guys confirm that this still works for you? >- Lukas >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] -- Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH [EMAIL PROTECTED] +49 9131 50 654 0 http://www.intermeta.de/ RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire Linux, Java, perl, Solaris -- Consulting, Training, Development 4 - 8 - 15 - 16 - 23 - 42 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]