https://bz.apache.org/bugzilla/show_bug.cgi?id=63564

            Bug ID: 63564
           Summary: StandardCharsets not supported before Android API 19
           Product: POI
           Version: 4.0.0-FINAL
          Hardware: Other
                OS: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POI Overall
          Assignee: dev@poi.apache.org
          Reporter: iakanoe1...@gmail.com
  Target Milestone: ---

I'm trying to use the POI library on Android API 17 but I can't since I get
this exception:

java.lang.NoClassDefException: java.nio.charset.StandardCharsets
  at StringUtil.java:32
  (...)

StringUtil.java:32 
  protected static final Charset ISO_8859_1 = StandardCharsets.ISO_8859_1;

Could this be changed to the following?

  protected static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");

It's backwards compatible and it's not deprecated for now... If not, an API
check can also be done, but that would make the library only work for Android.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to