Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Commit

Permalink
+ Fix encoding for glpi
Browse files Browse the repository at this point in the history
  • Loading branch information
garnier-quentin committed Mar 31, 2016
1 parent 60e3678 commit 6f60013
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ protected function getSession($key) {
}

protected function to_utf8($value) {
$value = mb_convert_encoding($value, "UTF-8", mb_detect_encoding($value));
$encoding = mb_detect_encoding($value);
if ($encoding == 'UTF-8') {
return $value;
}
$value = mb_convert_encoding($value, "UTF-8", $encoding);
return $value;
}

Expand Down

0 comments on commit 6f60013

Please sign in to comment.