Changeset 6111 for trunk/prototype/Sync.php
- Timestamp:
- 05/04/12 18:38:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/Sync.php
r5905 r6111 36 36 37 37 false; 38 } 39 } 40 41 ///Conversor Para utf8 ante de codificar para json pois o json so funciona com utf8 42 if(!function_exists('toUtf8')) 43 { 44 function toUtf8($data) 45 { 46 if(!is_array($data)) 47 return mb_convert_encoding( $data , 'UTF-8' , 'UTF-8 , ISO-8859-1' ); 48 49 $return = array(); 50 51 foreach ($data as $i => $v) 52 $return[toUtf8($i)] = toUtf8($v); 53 54 return $return; 38 55 } 39 56 } … … 128 145 } 129 146 catch( Exception $e ){ 130 $return[ $uri ] = $e->getMessage();147 $return[ $uri ] = toUtf8( $e->getMessage() ); 131 148 unset( $data[$uri] ); 132 149 continue;
Note: See TracChangeset
for help on using the changeset viewer.