Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/intl/uconv/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 2 kB image not shown  

Quelle  nsITextToSubURI.idl

  Sprache: C
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#include "nsISupports.idl"


%{C++
#define NS_ITEXTTOSUBURI_CONTRACTID "@mozilla.org/intl/texttosuburi;1"
%}

[scriptable, uuid(8B042E24-6F87-11d3-B3C8-00805F8A6670)]
interface nsITextToSubURI : nsISupports
{
  ACString ConvertAndEscape(in ACString charset, in AString text);
  AString UnEscapeAndConvert(in ACString charset, in ACString text);

  /**
   * Unescapes the given URI fragment (for UI purpose only)
   * Note:
   * <ul>
   *  <li> escaping back the result (unescaped string) is not guaranteed to
   *       give the original escaped string
   *  <li> The URI fragment (escaped) is assumed to be in UTF-8 and converted
   *       to AString (UTF-16)
   *  <li> In case of successful conversion any resulting character listed
   *       in netwerk/dns/IDNCharacterBlocklist.inc (except space) is escaped
   *  <li> Always succeeeds (callers don't need to do error checking)
   * </ul>
   *
   * @param aURIFragment the URI (or URI fragment) to unescape
   * @param aDontEscape whether to escape IDN blocklisted characters
   * @return Unescaped aURIFragment  converted to unicode
   */

  AString unEscapeURIForUI(in AUTF8String aURIFragment,
                           [optional] in boolean aDontEscape);
%{C++
  nsresult UnEscapeURIForUI(const nsACString& aURIFragment,
                            nsAString& _retval) {
    return UnEscapeURIForUI(aURIFragment, false, _retval);
  }
%}

  /**
   * Unescapes only non ASCII characters in the given URI fragment
   * note: this method assumes the URI as UTF-8 and fallbacks to the given
   * charset if the charset is an ASCII superset
   *
   * @param aCharset the charset to convert from
   * @param aURIFragment the URI (or URI fragment) to unescape
   * @return Unescaped aURIFragment  converted to unicode
   * @throws NS_ERROR_UCONV_NOCONV when there is no decoder for aCharset
   *         or NS_ERROR_UDEC_ILLEGALINPUT in case of conversion failure
   */

  [binaryname(UnEscapeNonAsciiURIJS)]
  AString unEscapeNonAsciiURI(in ACString aCharset, in AUTF8String aURIFragment);
};

Messung V0.5 in Prozent
C=90 H=98 G=94

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.