@Optional() int length, @Optional() String charset)
@Optional("2147483647") int length, @Optional("") String charset)
  public static Value iconv_substr(Env env,                       StringValue str,                       int offset,                       @Optional() int length,                       @Optional() String charset)  {    try {      if (charset == null)        charset = env.getIniString("iconv.internal_encoding");      int strlen = (int)iconvStrLength(str, charset);      if (offset < 0)        offset = strlen - offset;      if (length < 0)        length = (strlen - length) - offset;      if (offset < 0 || length < 0)        return StringValue.EMPTY;      return iconvDecodeEncode(charset, charset,          offset, length, str.toInputStream());    } catch (UnsupportedEncodingException e) {      String error = "Cannot convert from " + charset;      log.log(Level.FINE, error, e);      env.warning(L.l(error));      return BooleanValue.FALSE;    }  }