Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2526

Java Gradle projects can't handle unicode source

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • projects - Gradle
    • Windows, Java 1.8, Gradle 5.13

    Description

      If a java souce file contains unicode source, for example in identifiers, the built-in compiler fails to parse it, and the editor shows the wrong characters in the editor window. The file WILL compile correctly in gradle. The same sources cause no problem in ant-style Java projects. Setting
      "compileJava.options.encoding = 'UTF-8'" and

       
      tasks.withType(Compile) {
      options.encoding = 'UTF-8'
      }
      Does not fix the NetBeans problem.

       

      Here In Jira, I tried attaching a sample java source file, but Jira complains about a missing token. But I will try to enter some unicode source here:

       

      public enum EnumWithUnicode {
          Bondye,
          Xêvioso,
          Gû,
          Agê,
          Jo,
          Lêgba;

          public enum Family

      {         RADA, VUDÚ, VODUN;     }

      }

      [^EnumWithUnicode.java]

      Attachments

        Activity

          People

            Unassigned Unassigned
            charlweed Deft Developer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: