Problems with iconv in Linux web apps

Gareth Walker 1 Reputation point
2020-11-04T11:24:54.327+00:00

Hello,

I'm using WordPress with Woocommerce and SagePay on an Azure Linux web app, and the plugin makes use of iconv to create the crypt string to send through - however it is returning a blank string. The line in question is:
$value = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $value);

As a temporary fix I'm using this instead:
$value = mb_convert_encoding( $value, 'ISO-8859-1', 'UTF-8' );

This is not a permanent fix as the plugin will overwrite this if updated.

I'm guessing there is an issue with the iconv implementation on the server - this is what php_info gives me:

iconv support enabled
iconv implementation unknown
iconv library version unknown

Thanks for any assistance

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,008 questions
0 comments No comments
{count} votes