Author: Lars Michelsen <[email protected]>
Date: Fri Mar 23 11:31:16 2012 +0100
Committer: Lars Michelsen <[email protected]>
Commit-Date: Fri Mar 23 11:31:16 2012 +0100
Bugfix: ISO-8859-1 encoded map config files are now converted to UTf-8
during parsing the map config file
---
ChangeLog | 2 ++
share/server/core/classes/GlobalMapCfg.php | 4 ++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 34a586c..81f14b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@ Core
* Bugfix: Added missing permission for the Url module which is used when
having URLs in rotations
* Bugfix: Fixed exclude_member_states for map objects
+ * Bugfix: ISO-8859-1 encoded map config files are now converted to UTf-8
+ during parsing the map config file
Frontend
* Bugfix: Fixed cloning shape objects (view_type error message)
diff --git a/share/server/core/classes/GlobalMapCfg.php
b/share/server/core/classes/GlobalMapCfg.php
index ce125c9..99a0cf0 100644
--- a/share/server/core/classes/GlobalMapCfg.php
+++ b/share/server/core/classes/GlobalMapCfg.php
@@ -316,6 +316,10 @@ class GlobalMapCfg {
if($file[$l] == '')
continue;
+ // Fix ISO-8859-1 encoding. Convert to UTF-8
+ if(mb_detect_encoding($file[$l], 'UTF-8, ISO-8859-1') ==
'ISO-8859-1')
+ $file[$l] = utf8_encode($file[$l]);
+
// Don't recognize comments and empty lines, do nothing with
ending delimiters
$sFirstChar = substr(ltrim($file[$l]), 0, 1);
if($sFirstChar == ';' || $sFirstChar == '#')
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins