Skip to content

Commit

Permalink
Updated iconv_set_encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
pjw345 committed Oct 7, 2021
1 parent c06699d commit e8199cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pjw345/php-amazon-mws",
"type": "library",
"description": "An open-source library to connect to Amazon's MWS web services in an object-oriented manner, with a focus on intuitive usage.",
"version": "1.2.0",
"version": "1.2.1",
"keywords": [
"API",
"Amazon",
Expand Down
10 changes: 7 additions & 3 deletions src/MarketplaceWebServiceOrders/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,13 @@ private function _convertListOrdersByNextToken($request) {
*/
public function __construct($awsAccessKeyId, $awsSecretAccessKey, $applicationName, $applicationVersion, $config = null)
{
iconv_set_encoding('output_encoding', 'UTF-8');
iconv_set_encoding('input_encoding', 'UTF-8');
iconv_set_encoding('internal_encoding', 'UTF-8');
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');
}

$this->_awsAccessKeyId = $awsAccessKeyId;
$this->_awsSecretAccessKey = $awsSecretAccessKey;
Expand Down

0 comments on commit e8199cc

Please sign in to comment.