Constantes predefinidas

INTL_ICU_DATA_VERSION (string)
Versión de los datos en ICU4C.
INTL_ICU_VERSION (string)
La versión actual de la biblioteca ICU como una cadena decimal separada con puntos.
INTL_MAX_LOCALE_LEN (int)
Limita el tamaño de la configuración local, por defecto a 80 en PHP. Los nombres de configuraciones locales más grandes que este tamaño serán prohibidos.
IDNA_DEFAULT (int)
Prohíbe el tratamiento de los codepoints no asignados en la entrada para las funciones IDN y no verifica si la entrada es conforme a las reglas de nombres de dominio ASCII.
IDNA_ALLOW_UNASSIGNED (int)
Permite el tratamiento de los codepoints no asignados en la entrada para las funciones IDN.
IDNA_USE_STD3_RULES (int)
Verifica si la entrada para las funciones IDN es conforme a las reglas de nombres de dominio ASCII.
IDNA_CHECK_BIDI (int)
Verifica si la entrada es conforme a las reglas BiDi. Ignorado por la implementación IDNA2003, que siempre realiza esta verificación.
IDNA_CHECK_CONTEXTJ (int)
Verifica si la entrada es conforme a las reglas CONTEXTJ. Ignorado por la implementación IDNA2003, ya que esta verificación es nueva en IDNA2008.
IDNA_NONTRANSITIONAL_TO_ASCII (int)
Opción para una ejecución no transicional en la función idn_to_ascii(). La ejecución transicional está activada por defecto. Esta opción es ignorada por la implementación IDNA2003.
IDNA_NONTRANSITIONAL_TO_UNICODE (int)
Opción para una ejecución no transicional en la función idn_to_utf8(). La ejecución transicional está activada por defecto. Esta opción es ignorada por la implementación IDNA2003.
INTL_IDNA_VARIANT_2003 (int)
Utiliza el algoritmo IDNA 2003 en la función idn_to_utf8() así como en la función idn_to_ascii(). Este es el comportamiento por defecto. Esta constante y el uso por defecto han sido depreciados a partir de la versión PHP 7.2.0.
INTL_IDNA_VARIANT_UTS46 (int)
Utiliza el algoritmo UTS #46 en la función idn_to_utf8() así como en la función idn_to_ascii(). Disponible a partir de ICU 4.6.
GRAPHEME_EXTR_COUNT (int)
El número de graphemas por defecto a extraer.
GRAPHEME_EXTR_MAXBYTES (int)
El número máximo de bytes devueltos.
GRAPHEME_EXTR_MAXCHARS (int)
El número máximo de caracteres UTF-8 devueltos.

Los siguientes errores forman parte de una máscara de bits devuelta por el algoritmo UTS #46 en las funciones idn_to_utf8() y idn_to_ascii().

IDNA_ERROR_EMPTY_LABEL (int)
IDNA_ERROR_LABEL_TOO_LONG (int)
IDNA_ERROR_DOMAIN_NAME_TOO_LONG (int)
IDNA_ERROR_LEADING_HYPHEN (int)
IDNA_ERROR_TRAILING_HYPHEN (int)
IDNA_ERROR_HYPHEN_3_4 (int)
IDNA_ERROR_LEADING_COMBINING_MARK (int)
IDNA_ERROR_DISALLOWED (int)
IDNA_ERROR_PUNYCODE (int)
IDNA_ERROR_LABEL_HAS_DOT (int)
IDNA_ERROR_INVALID_ACE_LABEL (int)
IDNA_ERROR_BIDI (int)
IDNA_ERROR_CONTEXTJ (int)
ULOC_ACTUAL_LOCALE (int)
La configuración local de donde provienen realmente los datos.
ULOC_VALID_LOCALE (int)
La configuración local más específica soportada por ICU.
U_AMBIGUOUS_ALIAS_WARNING (int)
Este alias de convertidor puede ir a diferentes implementaciones de convertidor.
U_BAD_VARIABLE_DEFINITION (int)
Falta de '$' o nombre de variable en doble.
U_BRK_ASSIGN_ERROR (int)
Error de sintaxis en la instrucción de asignación de la regla RBBI.
U_BRK_ERROR_LIMIT (int)
Esto debe ser siempre el último valor para indicar el límite de los fallos del iterador de cortes.
U_BRK_ERROR_START (int)
Inicio de los códigos que indican los fallos del iterador de cortes.
U_BRK_HEX_DIGITS_EXPECTED (int)
Se esperan dígitos hexadecimales como parte de un carácter escapado en una regla.
U_BRK_INIT_ERROR (int)
Fallo en la inicialización. Probablemente faltan datos ICU.
U_BRK_INTERNAL_ERROR (int)
Se ha detectado un error interno (bug).
U_BRK_MALFORMED_RULE_TAG (int)
La etiqueta {nnn} en una regla está mal formada.
U_BRK_MISMATCHED_PAREN (int)
Paréntesis no apareados en una regla RBBI.
U_BRK_NEW_LINE_IN_QUOTED_STRING (int)
Falta comilla de cierre en una regla RBBI.
U_BRK_RULE_EMPTY_SET (int)
La regla contiene un conjunto Unicode vacío.
U_BRK_RULE_SYNTAX (int)
Error de sintaxis en la regla RBBI.
U_BRK_SEMICOLON_EXPECTED (int)
Falta punto y coma ';' al final de una regla RBBI.
U_BRK_UNCLOSED_SET (int)
Conjunto Unicode en una regla RBBI faltando un ']' de cierre.
U_BRK_UNDEFINED_VARIABLE (int)
Uso de una $Variable no definida en una regla RBBI.
U_BRK_UNRECOGNIZED_OPTION (int)
Opción en las reglas RBBI no reconocida.
U_BRK_VARIABLE_REDFINITION (int)
Variable de regla RBBI redefinida.
U_BUFFER_OVERFLOW_ERROR (int)
Un resultado no cabría en el búfer proporcionado.
U_CE_NOT_FOUND_ERROR (int)
Actualmente utilizado únicamente durante el ajuste del tope variable, pero puede ser utilizado generalmente.
U_COLLATOR_VERSION_MISMATCH (int)
La versión del colador no es compatible con la versión base.
U_DIFFERENT_UCA_VERSION (int)
ucol_open encontró una incompatibilidad entre la versión UCA y la versión de la imagen del colador, por lo que el colador fue construido a partir de reglas. Sin impacto en la función posterior.
U_ENUM_OUT_OF_SYNC_ERROR (int)
UEnumeration fuera de sincronización con la colección subyacente.
U_ERROR_LIMIT (int)
Alias of U_PLUGIN_ERROR_LIMIT.
U_ERROR_WARNING_LIMIT (int)
This must always be the last warning value to indicate the limit for UErrorCode warnings (last warning code +1).
U_ERROR_WARNING_START (int)
Start of information results (semantically successful).
U_FILE_ACCESS_ERROR (int)
The requested file cannot be found.
U_FMT_PARSE_ERROR_LIMIT (int)
The limit for format library errors.
U_FMT_PARSE_ERROR_START (int)
Start of format library errors.
U_IDNA_ACE_PREFIX_ERROR (int)
U_IDNA_CHECK_BIDI_ERROR (int)
U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR (int)
U_IDNA_ERROR_LIMIT (int)
U_IDNA_ERROR_START (int)
U_IDNA_LABEL_TOO_LONG_ERROR (int)
U_IDNA_PROHIBITED_ERROR (int)
U_IDNA_STD3_ASCII_RULES_ERROR (int)
U_IDNA_UNASSIGNED_ERROR (int)
U_IDNA_VERIFICATION_ERROR (int)
U_IDNA_ZERO_LENGTH_LABEL_ERROR (int)
U_ILLEGAL_ARGUMENT_ERROR (int)
Indicates an incorrect argument value.
U_ILLEGAL_CHAR_FOUND (int)
Character conversion: Illegal input sequence.
U_ILLEGAL_CHAR_IN_SEGMENT (int)
Unused as of ICU 2.4.
U_ILLEGAL_CHARACTER (int)
A special character is outside its allowed context.
U_ILLEGAL_ESCAPE_SEQUENCE (int)
ISO-2022 illlegal escape sequence.
U_ILLEGAL_PAD_POSITION (int)
Pad symbol misplaced in number pattern.
U_INDEX_OUTOFBOUNDS_ERROR (int)
Trying to access the index that is out of bounds.
U_INTERNAL_PROGRAM_ERROR (int)
Indicates a bug in the library code.
U_INTERNAL_TRANSLITERATOR_ERROR (int)
Internal transliterator system error.
U_INVALID_CHAR_FOUND (int)
Character conversion: Unmappable input sequence. In other APIs: Invalid character.
U_INVALID_FORMAT_ERROR (int)
Data format is not what is expected.
U_INVALID_FUNCTION (int)
A '&fn()' rule specifies an unknown transliterator.
U_INVALID_ID (int)
A '::id' rule specifies an unknown transliterator.
U_INVALID_PROPERTY_PATTERN (int)
Unused as of ICU 2.4.
U_INVALID_RBT_SYNTAX (int)
A '::id' rule was passed to the RuleBasedTransliterator parser.
U_INVALID_STATE_ERROR (int)
Requested operation can not be completed with ICU in its current state.
U_INVALID_TABLE_FILE (int)
Conversion table file not found.
U_INVALID_TABLE_FORMAT (int)
Conversion table file found, but corrupted.
U_INVARIANT_CONVERSION_ERROR (int)
Unable to convert a UChar* string to char* with the invariant converter.
U_MALFORMED_EXPONENTIAL_PATTERN (int)
Grouping symbol in exponent pattern.
U_MALFORMED_PRAGMA (int)
A 'use' pragma is invalid.
U_MALFORMED_RULE (int)
Elements of a rule are misplaced.
U_MALFORMED_SET (int)
A UnicodeSet pattern is invalid.
U_MALFORMED_SYMBOL_REFERENCE (int)
Unused as of ICU 2.4.
U_MALFORMED_UNICODE_ESCAPE (int)
A Unicode escape pattern is invalid.
U_MALFORMED_VARIABLE_DEFINITION (int)
A variable definition is invalid.
U_MALFORMED_VARIABLE_REFERENCE (int)
A variable reference is invalid.
U_MEMORY_ALLOCATION_ERROR (int)
Memory allocation error.
U_MESSAGE_PARSE_ERROR (int)
Unable to parse a message (message format).
U_MISMATCHED_SEGMENT_DELIMITERS (int)
Unused as of ICU 2.4.
U_MISPLACED_ANCHOR_START (int)
A start anchor appears at an illegal position.
U_MISPLACED_COMPOUND_FILTER (int)
Un filtro compuesto está en una posición inválida.
U_MISPLACED_CURSOR_OFFSET (int)
Un desplazamiento del cursor ocurre en una posición ilegal.
U_MISPLACED_QUANTIFIER (int)
Un cuantificador aparece después de un delimitador de fin de segmento.
U_MISSING_OPERATOR (int)
Una regla no contiene ningún operador.
U_MISSING_RESOURCE_ERROR (int)
El recurso solicitado no se encuentra.
U_MISSING_SEGMENT_CLOSE (int)
No utilizado desde ICU 2.4.
U_MULTIPLE_ANTE_CONTEXTS (int)
Más de un contexto anterior.
U_MULTIPLE_COMPOUND_FILTERS (int)
Más de un filtro compuesto.
U_MULTIPLE_CURSORS (int)
Más de un cursor.
U_MULTIPLE_DECIMAL_SEPARATORS (int)
Más de un separador decimal en el modelo numérico.
U_MULTIPLE_DECIMAL_SEPERATORS (int)
Alias de U_MULTIPLE_DECIMAL_SEPARATORS.
U_MULTIPLE_EXPONENTIAL_SYMBOLS (int)
Más de un símbolo exponencial en el modelo numérico.
U_MULTIPLE_PAD_SPECIFIERS (int)
Más de un símbolo de relleno en el modelo numérico.
U_MULTIPLE_PERCENT_SYMBOLS (int)
Más de un símbolo de porcentaje en el modelo numérico.
U_MULTIPLE_PERMILL_SYMBOLS (int)
Más de un símbolo de por mil en el modelo numérico.
U_MULTIPLE_POST_CONTEXTS (int)
Más de un contexto posterior.
U_NO_SPACE_AVAILABLE (int)
No hay espacio disponible para la expansión en búfer para el formato árabe.
U_NO_WRITE_PERMISSION (int)
Intento de modificar datos de solo lectura o datos constantes.
U_PARSE_ERROR (int)
Equivalente a Java ParseException.
U_PARSE_ERROR_LIMIT (int)
El límite para los errores del Transliterator.
U_PARSE_ERROR_START (int)
Inicio de los errores del Transliterator.
U_PATTERN_SYNTAX_ERROR (int)
Error de sintaxis en el modelo de formato.
U_PRIMARY_TOO_LONG_ERROR (int)
El usuario intentó definir una variable superior a un valor primario de más de dos bytes.
U_REGEX_BAD_ESCAPE_SEQUENCE (int)
Secuencia de escape no reconocida en el modelo.
U_REGEX_BAD_INTERVAL (int)
Error en el intervalo {min,max}.
U_REGEX_ERROR_LIMIT (int)
This must always be the last value to indicate the limit for regexp errors.
U_REGEX_ERROR_START (int)
Start of codes indicating Regexp failures.
U_REGEX_INTERNAL_ERROR (int)
An internal error (bug) was detected.
U_REGEX_INVALID_BACK_REF (int)
Back-reference to a non-existent capture group.
U_REGEX_INVALID_FLAG (int)
Invalid value for match mode flags.
U_REGEX_INVALID_STATE (int)
RegexMatcher in invalid state for requested operation.
U_REGEX_LOOK_BEHIND_LIMIT (int)
Look-Behind pattern matches must have a bounded maximum length.
U_REGEX_MAX_LT_MIN (int)
In {min,max}, max is less than min.
U_REGEX_MISMATCHED_PAREN (int)
Incorrectly nested parentheses in regexp pattern.
U_REGEX_NUMBER_TOO_BIG (int)
Decimal number is too large.
U_REGEX_PROPERTY_SYNTAX (int)
Incorrect Unicode property.
U_REGEX_RULE_SYNTAX (int)
Syntax error in regexp pattern.
U_REGEX_SET_CONTAINS_STRING (int)
Regexps cannot have UnicodeSets containing strings.
U_REGEX_UNIMPLEMENTED (int)
Use of regexp feature that is not yet implemented.
U_RESOURCE_TYPE_MISMATCH (int)
An operation is requested over a resource that does not support it.
U_RULE_MASK_ERROR (int)
A rule is hidden by an earlier more general rule.
U_SAFECLONE_ALLOCATED_WARNING (int)
A SafeClone operation required allocating memory (informational only).
U_SORT_KEY_TOO_SHORT_WARNING (int)
Number of levels requested in getBound is higher than the number of levels in the sort key.
U_STANDARD_ERROR_LIMIT (int)
This must always be the last value to indicate the limit for standard errors.
U_STATE_OLD_WARNING (int)
ICU has to use compatibility layer to construct the service. Expect performance/memory usage degradation.
U_STATE_TOO_OLD_ERROR (int)
ICU cannot construct a service from this state, as it is no longer supported.
U_STRING_NOT_TERMINATED_WARNING (int)
An output string could not be NUL-terminated because output length==destCapacity.
U_STRINGPREP_CHECK_BIDI_ERROR (int)
Alias of U_IDNA_CHECK_BIDI_ERROR.
U_STRINGPREP_PROHIBITED_ERROR (int)
Alias of U_IDNA_PROHIBITED_ERROR.
U_STRINGPREP_UNASSIGNED_ERROR (int)
Alias of U_IDNA_UNASSIGNED_ERROR.
U_TOO_MANY_ALIASES_ERROR (int)
There are too many aliases in the path to the requested resource. It is very possible that a circular alias definition has occured.
U_TRAILING_BACKSLASH (int)
A dangling backslash.
U_TRUNCATED_CHAR_FOUND (int)
Character conversion: Incomplete input sequence.
U_UNCLOSED_SEGMENT (int)
A closing ')' is missing.
U_UNDEFINED_SEGMENT_REFERENCE (int)
A segment reference does not correspond to a defined segment.
U_UNDEFINED_VARIABLE (int)
A variable reference does not correspond to a defined variable.
U_UNEXPECTED_TOKEN (int)
Syntax error in format pattern.
U_UNMATCHED_BRACES (int)
Braces do not match in message pattern.
U_UNQUOTED_SPECIAL (int)
A special character was not quoted or escaped.
U_UNSUPPORTED_ATTRIBUTE (int)
Unused as of ICU 2.4.
U_UNSUPPORTED_ERROR (int)
Requested operation not supported in current context.
U_UNSUPPORTED_ESCAPE_SEQUENCE (int)
ISO-2022 unsupported escape sequence.
U_UNSUPPORTED_PROPERTY (int)
Unused as of ICU 2.4.
U_UNTERMINATED_QUOTE (int)
A closing single quote is missing.
U_USELESS_COLLATOR_ERROR (int)
Collator is options only and no base is specified.
U_USING_DEFAULT_WARNING (int)
A resource bundle lookup returned a result from the root locale (not an error).
U_USING_FALLBACK_WARNING (int)
A resource bundle lookup returned a fallback result (not an error).
U_VARIABLE_RANGE_EXHAUSTED (int)
Too many stand-ins generated for the given variable range.
U_VARIABLE_RANGE_OVERLAP (int)
The variable range overlaps characters used in rules.
U_ZERO_ERROR (int)
No error, no warning.

add a note

User Contributed Notes 2 notes

up
5
PHP Guru
5 years ago
idn_to_ascii('faß.de');

will return fass.de
(Due to Germans using the ß symbol as a contraction of ss)

idn_to_ascii('faß.de', IDNA_NONTRANSITIONAL_TO_ASCII);

will return xn--fa-hia.de
(This is the correct behavior too allow faß.de and fass.de to be registered as different domain names.)

idn_to_utf8('xn--fa-hia.de');

will return fass.de

idn_to_utf8('xn--fa-hia.de', IDNA_NONTRANSITIONAL_TO_UNICODE);

will return faß.de
(Again this is the correct behavior.)
up
1
rg at mejoramos dot com
3 years ago
to date (MARCH 2023), the version Spanish not give info about the constant `INTL_ICU_VERSION`, take a look to English version, with details about the important constant `INTL_ICU_VERSION`
To Top