Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1445

IDEA fails to compile UTF16 file instrumented by Clover

    XMLWordPrintable

Details

    • Severity 3 - Minor

    Description

      Create a simple file with UTF16 encoding, e.g.:

      public class Unicode16 {
          public static void main(String[] args) {
              char z = 'ż';
          }
      }
      

      (right click in source editor -> File Encoding -> UTF16)

      Build with Clover fails with an error message like:

      C:\Users\Marek\AppData\Local\Temp\javasyntax188072041083267764871javasyntax18\Unicode16.java
      error: illegal character: '\u02d9'
      error: illegal character: '\u0000'
      error: illegal character: '\u0000'
      ...
      

      Clover outputs instrumented file in the UTF8 format, so this might be a cause.

      Note: the same UTF16 file compiles correctly in Eclipse.

      It was reproduced just once. Probably due to UTF-8 - UTF-16 conversions, \u0000 characters were put in between and Clover rewrote it.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mparfianowicz Marek Parfianowicz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: