Hi, Am Dienstag, den 23.06.2020, 20:29 +0200 schrieb Tomáš Procházka: > some tests fail on Windows when test file contains accented > characters. > > All files in NetBeans repository have UTF-8 encoding, but my Windows 7 > machine uses Windows-1252 encoding. Test files are then not read with > correct encoding and test fails. > > For example file > https://github.com/apache/netbeans/blob/master/php/php.latte/test/unit/data/testfiles/indent/testIssue241118_01.latte > > I found that default encoding for java can be changed with parameter > "-Dfile.encoding=UTF-8". > > Is there any way how to force NetBeans build to use UTF-8 encoding? >
the right way to fix this would be to fix CslTestBase: https://github.com/apache/netbeans/blob/master/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java#L362 Converting bytes to string without specifying the charset is a no-no and will almost always break in very subtle ways. I assume that in the past the unittests were developed on linux machines and were run on the linux based CI infrastructure. You can try to pass the file encoding to the ant call. If you run the unittest from the IDE, you can "rerun" (second green double arrow in the output tab) and specifiy properties there. HTH Matthias --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
