diff --git a/CHANGELOG.md b/CHANGELOG.md index da0d759..ddd1c3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ Given a version number MAJOR.MINOR.PATCH, increment: ## [Unreleased] +### Fixed +- UTF-8 encoding ## [0.5.0] - 2025-02-18 ### Added diff --git a/src/utils/api.php b/src/utils/api.php index 2df58e1..e3e1583 100644 --- a/src/utils/api.php +++ b/src/utils/api.php @@ -28,8 +28,7 @@ public static function castJsonToApiFormat($json, $resourceName = null) continue; } if (is_string($value)) { - $value = utf8_decode($value); - $clean[$key] = utf8_encode($value); + $clean[$key] = mb_convert_encoding($value, 'UTF-8', 'UTF-8'); continue; } if ($value instanceof DateTime) {