[Fusioninventory-devel] Import OCS agent in plugin FusionInventory plugins (in dev now)
David DURIEUX
d.durieux at siprossii.com
Thu Feb 10 08:42:51 UTC 2011
Hello,
The ocs agents works if they communicate with the plugin
fusioninventory for local inventory (of computer).
BUT, with have some problems with charset!
Unable to detec right charset so it's not very well.
For example, I have try with RU inventory but not works with these two
codes :
if (strstr(gzuncompress($GLOBALS["HTTP_RAW_POST_DATA"]),'encoding="ISO-8859-1"')) {
$data = gzuncompress($GLOBALS["HTTP_RAW_POST_DATA"]);
$from_charset=mb_detect_encoding($data, "auto");
$data = mb_convert_encoding($data,"UTF-8",$from_charset);
$GLOBALS["HTTP_RAW_POST_DATA"] = gzcompress($data);
}
and
if (strstr(gzuncompress($GLOBALS["HTTP_RAW_POST_DATA"]),'encoding="ISO-8859-1"')) {
$data = utf8_encode(gzuncompress($GLOBALS["HTTP_RAW_POST_DATA"]));
$GLOBALS["HTTP_RAW_POST_DATA"] = gzcompress($data);
}
but not works. If we have only one type of charset perhaps but an
option into plugin to force charset conversion for OCS inventory only)
but if you have inventory with differents charset (many contries) it
will not works.
Somebody have an idea?
David Durieux
More information about the Fusioninventory-devel
mailing list