/** * Transform a Unicode String to ASCII Compatible Encoding String according * to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>. * * <p>If the transformation fails (because the input is not a valid IDN), an * exception will be thrown. * * <p>This method can handle either an individual label or an entire domain name. * In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop), * U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop). * All of these will become U+002E (full stop) in the result. * * @param input the Unicode name * @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES}, * or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES} * @return the ACE name * @throws IllegalArgumentException if {@code input} does not conform to <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a> */ public static String toASCII(String input, int flags) { return NativeIDN.toASCII(input, flags); }
/** * Transform a Unicode String to ASCII Compatible Encoding String according * to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>. * * <p>If the transformation fails (because the input is not a valid IDN), an * exception will be thrown. * * <p>This method can handle either an individual label or an entire domain name. * In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop), * U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop). * All of these will become U+002E (full stop) in the result. * * @param input the Unicode name * @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES}, * or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES} * @return the ACE name * @throws IllegalArgumentException if {@code input} does not conform to <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a> */ public static String toASCII(String input, int flags) { return NativeIDN.toASCII(input, flags); }
/** * Transform a Unicode String to ASCII Compatible Encoding String according * to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>. * * <p>If the transformation fails (because the input is not a valid IDN), an * exception will be thrown. * * <p>This method can handle either an individual label or an entire domain name. * In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop), * U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop). * All of these will become U+002E (full stop) in the result. * * @param input the Unicode name * @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES}, * or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES} * @return the ACE name * @throws IllegalArgumentException if {@code input} does not conform to <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a> */ public static String toASCII(String input, int flags) { return NativeIDN.toASCII(input, flags); }
/** * Transform a Unicode String to ASCII Compatible Encoding String according * to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>. * * <p>If the transformation fails (because the input is not a valid IDN), an * exception will be thrown. * * <p>This method can handle either an individual label or an entire domain name. * In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop), * U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop). * All of these will become U+002E (full stop) in the result. * * @param input the Unicode name * @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES}, * or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES} * @return the ACE name * @throws IllegalArgumentException if {@code input} does not conform to <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a> */ public static String toASCII(String input, int flags) { return NativeIDN.toASCII(input, flags); }
/** * Transform a Unicode String to ASCII Compatible Encoding String according * to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>. * * <p>If the transformation fails (because the input is not a valid IDN), an * exception will be thrown. * * <p>This method can handle either an individual label or an entire domain name. * In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop), * U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop). * All of these will become U+002E (full stop) in the result. * * @param input the Unicode name * @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES}, * or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES} * @return the ACE name * @throws IllegalArgumentException if {@code input} does not conform to <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a> */ public static String toASCII(String input, int flags) { return NativeIDN.toASCII(input, flags); }
/** * Transform a Unicode String to ASCII Compatible Encoding String according * to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>. * * <p>If the transformation fails (because the input is not a valid IDN), an * exception will be thrown. * * <p>This method can handle either an individual label or an entire domain name. * In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop), * U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop). * All of these will become U+002E (full stop) in the result. * * @param input the Unicode name * @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES}, * or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES} * @return the ACE name * @throws IllegalArgumentException if {@code input} does not conform to <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a> */ public static String toASCII(String input, int flags) { return NativeIDN.toASCII(input, flags); }
/** * Transform a Unicode String to ASCII Compatible Encoding String according * to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>. * * <p>If the transformation fails (because the input is not a valid IDN), an * exception will be thrown. * * <p>This method can handle either an individual label or an entire domain name. * In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop), * U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop). * All of these will become U+002E (full stop) in the result. * * @param input the Unicode name * @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES}, * or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES} * @return the ACE name * @throws IllegalArgumentException if {@code input} does not conform to <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a> */ public static String toASCII(String input, int flags) { return NativeIDN.toASCII(input, flags); }