Skip to content

Commit 3b824c2

Browse files
committed
provider: IP2LocationBinary: replace utf8_encode with mb_convert_encoding
1 parent 9c612ea commit 3b824c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Provider/IP2LocationBinary/IP2LocationBinary.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ public function geocodeQuery(GeocodeQuery $query): Collection
8181
Address::createFromArray([
8282
'providedBy' => $this->getName(),
8383
'countryCode' => $records['countryCode'],
84-
'country' => null === $records['countryName'] ? null : utf8_encode($records['countryName']),
84+
'country' => null === $records['countryName'] ? null : mb_convert_encoding($records['countryName'], 'UTF-8', 'ISO-8859-1'),
8585
'adminLevels' => $adminLevels,
86-
'locality' => null === $records['cityName'] ? null : utf8_encode($records['cityName']),
86+
'locality' => null === $records['cityName'] ? null : mb_convert_encoding($records['cityName'], 'UTF-8', 'ISO-8859-1'),
8787
'latitude' => $records['latitude'],
8888
'longitude' => $records['longitude'],
8989
'postalCode' => $records['zipCode'],

0 commit comments

Comments
 (0)