Skip to content

Instantly share code, notes, and snippets.

@PetraMotz
Created August 4, 2021 12:03
Show Gist options
  • Save PetraMotz/492f92f6355ac88a06e03fc6e6707757 to your computer and use it in GitHub Desktop.
Save PetraMotz/492f92f6355ac88a06e03fc6e6707757 to your computer and use it in GitHub Desktop.
PHP #umlaute #url
$mail = 'info@ärztezentrum-wörishofen.de';
$onlim = '[email protected]'; ACE
$temp = '[email protected]'; ASCII
$con = idn_to_ascii ('info@ärztezentrum-wörishofen.de' , $flags = IDNA_DEFAULT , $variant = INTL_IDNA_VARIANT_UTS46 , $idna_info = null ) ;
$converted = idn_to_utf8 ( $con , 0 , $variant = INTL_IDNA_VARIANT_UTS46 , $idna_info = null );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment