#1267 ant fails because of encoding error on windows

3.0.0
closed-fixed
None
5
2014-08-01
2014-04-20
Jo-W
No

I was trying to build findbugs (git clone https://code.google.com/p/findbugs = 6124988c7e216be59f819afd0de4aa9979b13cf1) using ant on windows 8.1.
This failed because of a file encoding error:

    findbugsTestCases.check:

    compileFindbugsTestCases:

    classes:
        [javac] Compiling 1228 source files to D:\BLA\findbugs\findbugsTestCases\build\classes
        [javac] D:\BLA\findbugs\findbugsTestCases\src\java\com\google\errorprone\bugpatterns\LongLiteralLowerCaseSuffixPosit
    iveCase1.java:27: error: unmappable character for encoding Cp1252
        [javac]   private static final String TEST_STRING = "├Ä├▒┼ú├⌐r├▒├Ñ┼ú├«├╢├▒├Ñ─╝├«┼╛├Ñ┼ú├«ß╗?├▒";
        [javac]                                                                                   ^
        [javac] D:\BLA\findbugs\findbugsTestCases\src\java\com\google\errorprone\bugpatterns\LongLiteralLowerCaseSuffixPosit
    iveCase2.java:27: error: unmappable character for encoding Cp1252
        [javac]   private static final String TEST_STRING = "├Ä├▒┼ú├⌐r├▒├Ñ┼ú├«├╢├▒├Ñ─╝├«┼╛├Ñ┼ú├«ß╗?├▒";
        [javac]                                                                                   ^
        [javac] 2 errors

    BUILD FAILED
    D:\BLA\findbugs\build.xml:27: The following error occurred while executing this line:
    D:\BLA\findbugs\findbugs\build.xml:575: The following error occurred while executing this line:
    D:\BLA\findbugs\findbugsTestCases\build.xml:67: Compile failed; see the compiler error output for details.

I fixed this by adding encoding="UTF-8" to the javac elements in findbugs\findbugsTestCases\build.xml. Ant is able to build everything successful now.

Discussion

  • Andrey Loskutov

    Andrey Loskutov - 2014-04-20
    • status: open --> closed-fixed
    • assigned_to: Andrey Loskutov
     
  • Jo-W

    Jo-W - 2014-04-20

    BUILD SUCCESSFUL

     

Log in to post a comment.