diff options
| author | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-08-28 09:39:05 +0000 |
|---|---|---|
| committer | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-08-28 09:39:05 +0000 |
| commit | 356e021b4ca585bb730a6fda1854e6c93d9d5733 (patch) | |
| tree | 3f5fbfe652294a33069d286a277bf3677736fdcf /frontends/php/include | |
| parent | 34fe5c6e8f3008210a81bcccf4906089561ec231 (diff) | |
| download | zabbix-356e021b4ca585bb730a6fda1854e6c93d9d5733.tar.gz zabbix-356e021b4ca585bb730a6fda1854e6c93d9d5733.tar.xz zabbix-356e021b4ca585bb730a6fda1854e6c93d9d5733.zip | |
- support of encoding of log files to displayed encoding (Alexei)
[svn merge -r4686:4690 svn://svn.zabbix.com/branches/1.4]
git-svn-id: svn://svn.zabbix.com/trunk@4692 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/config.inc.php | 15 | ||||
| -rw-r--r-- | frontends/php/include/defines.inc.php | 3 |
2 files changed, 17 insertions, 1 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index d0337da0..7ebbae52 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -1879,4 +1879,17 @@ function TODO($msg) { echo "TODO: ".$msg.BR; } // DEBUG INFO!!! { return ($timestamp==0)?S_NEVER:date($format,$timestamp); } -?>
\ No newline at end of file + + function encode_log($data) + { + if(defined('ZBX_LOG_ENCODING_DEFAULT') && function_exists('mb_convert_encoding')) + { + $new=mb_convert_encoding($data, S_HTML_CHARSET, ZBX_LOG_ENCODING_DEFAULT); + } + else + { + $new = $data; + } + return $new; + } +?> diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php index 8bc95333..d52df3c4 100644 --- a/frontends/php/include/defines.inc.php +++ b/frontends/php/include/defines.inc.php @@ -434,6 +434,9 @@ define('ZBX_GUEST_USER','guest'); +/* Define if your logs are in non-standard format */ +/* define('ZBX_LOG_ENCODING_DEFAULT', 'Shift_JIS');*/ + global $_GET, $_POST, $_COOKIE, $_REQUEST; /* Support for PHP5. PHP5 does not have $HTTP_..._VARS */ |
