caponica / AmazonMwsComplete

Name-spaced wrappers for the full set of Amazon MWS client libraries
56 stars 53 forks source link

iconv.output_encoding is deprecated since PHP 5.6 #11

Closed anhvn closed 7 years ago

anhvn commented 7 years ago

When I call the API it throws the deprecated error in the line 899 in Client.php so I cannot use this

iconv_set_encoding('output_encoding', 'UTF-8');

You should check the PHP Version to something like this

if (PHP_VERSION_ID < 50600) {
    iconv_set_encoding('input_encoding', 'UTF-8');
    iconv_set_encoding('output_encoding', 'UTF-8');
    iconv_set_encoding('internal_encoding', 'UTF-8');
} else {
   ini_set('default_charset', 'UTF-8');
}

Thanks

caponica commented 7 years ago

Thanks, this has been merged