Changeset 1442 for g-map/files/lib/page/MapAjaxPage.class.php
- Timestamp:
- 05/29/11 11:08:27 (2 years ago)
- Files:
-
- 1 modified
-
g-map/files/lib/page/MapAjaxPage.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
g-map/files/lib/page/MapAjaxPage.class.php
r1441 r1442 147 147 148 148 $username = $user->username; 149 150 // json encode can only use utf-8 149 151 if(CHARSET != 'UTF-8') { 150 $username = StringUtil:: encodeHTML($username);152 $username = StringUtil::convertEncoding(CHARSET, 'UTF-8', $username); 151 153 } 152 154 … … 167 169 parent::show(); 168 170 169 // send header for corrent charset 171 // json encode can only use utf-8, thats why we converted all data before 172 $str = json_encode($this->datapoints); 173 170 174 @header('Content-Type: application/json; charset='.CHARSET); 171 echo json_encode($this->datapoints); 175 if(CHARSET != 'UTF-8') { 176 echo StringUtil::convertEncoding('UTF-8', CHARSET, $str); 177 } else { 178 echo $str; 179 } 172 180 } 173 181 }
