summaryrefslogtreecommitdiffstats
path: root/web/lib/aurjson.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib/aurjson.class.php')
-rw-r--r--web/lib/aurjson.class.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
index ba6d628c..befb6397 100644
--- a/web/lib/aurjson.class.php
+++ b/web/lib/aurjson.class.php
@@ -139,6 +139,15 @@ class AurJSON {
if ( $result && (mysql_num_rows($result) > 0) ) {
$row = mysql_fetch_assoc($result);
mysql_free_result($result);
+ foreach($row as $name => $value) {
+ $converted = utf8_encode($value);
+ if ($converted) {
+ $row[$name] = $converted;
+ }
+ else {
+ $row[$name] = "[PKGBUILD error: non-UTF8 character]";
+ }
+ }
return $this->json_results('info', $row);
}
else {