right now I'm working with the idn_to_ascii function to convert some IDN domain names into ascii ones.
This code worked nice, until a customer used ß in his domain name:
idn_to_ascii( "teßt" );
This led to the wrong result of beeing converted to "tesst" - a little bit of researched and I found out that there was an update in the IDN 2008 to include ß as special convertable character. So the new call is
idn_to_ascii("teßt", IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
Which works fine in our developement environment (XAMPP, Windows, PHP 5.4.16)
After I deployed it to our productive system, the result of the above code is "NULL", eventhough it's the exact same PHP 5.4.16 version, only that it's an CentOS6 system.
More interesting:
Production System:
var_dump(IDNA_NONTRANSITIONAL_TO_ASCII); => string(29) "IDNA_NONTRANSITIONAL_TO_ASCII"
var_dump(INTL_IDNA_VARIANT_UTS46); => string(23) "INTL_IDNA_VARIANT_UTS46"
Dev System:
var_dump(IDNA_NONTRANSITIONAL_TO_ASCII); => int(16)
var_dump(INTL_IDNA_VARIANT_UTS46); => int(1)
This clearly shows me that it's not including the definitions for the new standard, but it should, since libidn2 and php-intl are installed on the production system.
I hope you have any clues for me, since I dont know where to look else. Thanks in advance!