Uses
Uses | Description |
---|---|
wp-includes/Requests/IDNAEncoder.php: Requests_IDNAEncoder::to_ascii() | Convert a UTF-8 string to an ASCII string using Punycode |
Encode a hostname using Punycode
(string) (Required) Hostname
(string) Punycode-encoded hostname
File: wp-includes/Requests/IDNAEncoder.php
public static function encode($string) { $parts = explode('.', $string); foreach ($parts as &$part) { $part = self::to_ascii($part); } return implode('.', $parts); }
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_idnaencoder/encode