$v) { $data[$k] = printer_data_converter::$method_name($v); } if (empty($data)) { $data = printer_data_converter::$method_name($data); } } } return $data; } public static function convert_to_cp850($data) { global $charset; if(is_string($data)) { $data = iconv($charset,'cp850',$data); } if(is_array($data)) { foreach($data as $k=>$v) { $data[$k] = printer_data_converter::convert_to_cp850($v); } } return $data; } public static function convert_to_ci8($data) { global $charset; $to_ci8 = array( "#"=>"\\23", // "0"=>"\\30", "à"=>"\\40", "â"=>"\\5b", "ç"=>"\\5c", "ê"=>"\\5d", "î"=>"\\5e", "ô"=>"\\60", "é"=>"\\7b", "ù"=>"\\7c", "è"=>"\\7d", "û"=>"\\7e", ); if(is_string($data)) { if($charset=='utf-8') { $data = utf8_decode($data); } $data=strtr($data,$to_ci8); } if(is_array($data)) { foreach($data as $k=>$v) { $data[$k] = printer_data_converter::convert_to_ci8($v); } } return $data; } }