throws Throwable
  public static String html_entity_decode(Env env,                                          String string,	                              				  @Optional int quoteStyle,					                                @Optional String charset)    throws Throwable  {    if (string == null)      return "";   // StringBuilder result = new StringBuilder();   // int i = 0;    //int length = string.length();    // generate keys & values for preg_replace   // ArrayValue decodedArray = new ArrayValueImpl();    //ArrayValue encodedArray = new ArrayValueImpl();    Value[] keys = HTML_SPECIALCHARS_ARRAY.getKeyArray();    Value[] values = HTML_SPECIALCHARS_ARRAY.getValueArray(env);    Value value = null;    int length = keys.length;    for (int i = 0; i < length; i++) {       value = RegexpModule.ereg_replace(env,                                                      values[i].toString(),                                                      keys[i].toString(),                                                      string);      string = value.toString();    }    /*    Value value = QuercusRegexpModule.preg_replace(env,                                                   encodedArray,                                                   decodedArray,                                                   new StringValueImpl(string),                                                   -1,                                                   null);*/    if (value != null)      return value.toString();    else      return string;  }