title: Writing Unicode plane 1 characters with Apache POI
body: <p>I'm trying to write Unicode characters into an Excel file. I did it successfully with Unicode plane 0, but not with Unicode plane 1.</p>
  
  <p>I use POI 3.16 and use this simple piece of code to test :</p>
  
  <pre><code>    public void createFile() throws IOException {
          SXSSFWorkbook workbook = new SXSSFWorkbook(1);
          SXSSFSheet sheet = workbook.createSheet("data");
  
          Row row = sheet.createRow(0);
          Cell cell = row.createCell(0);
          String value = "ᚬᚬᚬ";
          cell.setCellValue(value);
  
          try (FileOutputStream fop = new FileOutputStream("C:\\Users\\Emilien\\PROJECTS_FILES\\BUGS\\SLIMS_14124\\test.xlsx")) {
              workbook.write(fop);
          } finally {
              workbook.dispose();
          }
      }
  </code></pre>
  
  <p>In excel 2016, <strong>the cell contains "??????ᚬᚬᚬ" instead of displaying "ᚬᚬᚬ"</strong>.
  Find URLs about characters here <a href="http://graphemica.com/%E1%9A%AC" rel="nofollow noreferrer">ᚬ</a> and here <a href="http://graphemica.com/%F0%9F%92%A9" rel="nofollow noreferrer"></a>.</p>
  
  <p>I unzipped the excel file and investigated the content of sheet <em>data</em>, the XML content corresponding to the cell is :</p>
  
  <pre><code>&lt;row r="1"&gt;
     &lt;c r="A1" t="inlineStr"&gt;&lt;is&gt;&lt;t&gt;??????&amp;#5804;&amp;#5804;&amp;#5804;&lt;/t&gt;&lt;/is&gt;&lt;/c&gt; 
  &lt;/row&gt;
  </code></pre>
  
  <p>As we can see, the plane 0 characters have been converted into HTML Unicode characters, while the plane 1 characters have been lost.</p>
  
  <p>If I change "??????" by "" in the XML file, and compress the files into a new xlsx file again, the characters are rendered as wanted (meaning, the cell actually contains  ᚬᚬᚬ).</p>
  
  <p>It seems like the Java Strings are not written into the XML as UTF-8, but seem to be processed by POI (we end up with HTML characters). Has anyone experienced this before ? Is it possible to write SMP characters into an Excel file ? </p>
  
  <p>Could it be a bug ? I mean, the XML files declare a UTF-8 encoding in their header but don't seem to respect it. Am I missing something ?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  </code></pre>