final class \SmartPunycode
{
} ->
- Language: PHP
- Located at: lib/framework/plugins/lib_idn_punycode.php
- Package: Plugins:ConvertersAndParsers
- Namespace: \
- Class Name: SmartPunycode
- Version: v.20211127
- Depends: classes: SmartUnicode
- Usage: dynamic object: (new Class())->method() - This class provides only DYNAMIC methods
public function __construct (
) {}
@
@param: {string} $encoding: Character encoding
public function encode (
string $input
) {}
-> STRING
@return: {string} Punycode representation in ASCII
@param: {string} $input: Domain name in Unicode to be encoded
public function decode (
string $input
) {}
-> STRING
@return: {string} Unicode domain name
@param: {string} $input: Domain name in Punycode
<?php
$domain_iso = (string) (new SmartPunycode())->encode('jösefsson.tßst123.org'); // outputs: xn--jsefsson-n4a.xn--tst123-bta.org
$domain_unicode = (string) (new SmartPunycode())->decode('xn--jsefsson-n4a.xn--tst123-bta.org'); // outputs: jösefsson.tßst123.org
$email_iso = (string) (new SmartPunycode())->encode('räksmörgås@jösefsson.tßst123.org'); // outputs: xn--rksmrgs@jsefsson-vnbx43ag.xn--tst123-bta.org
$email_unicode = (string) (new SmartPunycode())->decode('xn--rksmrgs@jsefsson-vnbx43ag.xn--tst123-bta.org'); // outputs: räksmörgås@jösefsson.tßst123.org
// #end php code
documentation generated on: 2023-10-19 23:15:45 +0000
Smart.Framework © 2009-2023 unix-world.org