ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilExcelUtils Class Reference
+ Collaboration diagram for ilExcelUtils:

Public Member Functions

 _convert_text ($a_text, $a_target=CHARSET_LATIN1)

Detailed Description

Definition at line 35 of file class.ilExcelUtils.php.

Member Function Documentation

ilExcelUtils::_convert_text (   $a_text,
  $a_target = CHARSET_LATIN1 
)

Definition at line 37 of file class.ilExcelUtils.php.

References CHARSET_LATIN1, and CHARSET_MACOS.

Referenced by ilObjUserFolderGUI\_addLearningProgressWorksheet(), ilObjPaymentSettingsGUI\addStatisticWorksheet(), ilObjPaymentSettingsGUI\addVendorWorksheet(), ilTestExport\aggregatedResultsToExcel(), ilQuestionpoolExport\buildExportFileXLS(), ilObjUserFolder\createExcelExport(), ilSurveyEvaluationGUI\exportCumulatedResults(), ilTestExport\exportToExcel(), ilSurveyEvaluationGUI\exportUserSpecificResults(), SurveyMatrixQuestion\setExportCumulatedXLS(), SurveyQuestion\setExportCumulatedXLS(), SurveyTextQuestion\setExportDetailsXLS(), SurveyOrdinalQuestion\setExportDetailsXLS(), SurveyNominalQuestion\setExportDetailsXLS(), assNumeric\setExportDetailsXLS(), assTextQuestion\setExportDetailsXLS(), assTextSubset\setExportDetailsXLS(), SurveyMetricQuestion\setExportDetailsXLS(), assOrderingQuestion\setExportDetailsXLS(), assImagemapQuestion\setExportDetailsXLS(), assJavaApplet\setExportDetailsXLS(), assSingleChoice\setExportDetailsXLS(), assMultipleChoice\setExportDetailsXLS(), assMatchingQuestion\setExportDetailsXLS(), assClozeTest\setExportDetailsXLS(), and SurveyMatrixQuestion\setExportDetailsXLS().

{
$a_text = preg_replace("/<[^>]*?>/", "", $a_text);
return utf8_decode($a_text);
switch ($a_target)
{
$charmap_latin1 = array(
utf8_decode("ß") => chr(0xDF),
utf8_decode("à") => chr(0xE0),
utf8_decode("á") => chr(0xE1),
utf8_decode("â") => chr(0xE2),
utf8_decode("ã") => chr(0xE3),
utf8_decode("ä") => chr(0xE4),
utf8_decode("å") => chr(0xE5),
utf8_decode("æ") => chr(0xE6),
utf8_decode("À") => chr(0xC0),
utf8_decode("Á") => chr(0xC1),
utf8_decode("Â") => chr(0xC2),
utf8_decode("Ã") => chr(0xC3),
utf8_decode("Ä") => chr(0xC4),
utf8_decode("Å") => chr(0xC5),
utf8_decode("Æ") => chr(0xC6),
utf8_decode("ç") => chr(0xE7),
utf8_decode("Ç") => chr(0xC7),
utf8_decode("ð") => chr(0xF0),
utf8_decode("è") => chr(0xE8),
utf8_decode("é") => chr(0xE9),
utf8_decode("ê") => chr(0xEA),
utf8_decode("ë") => chr(0xEB),
utf8_decode("È") => chr(0xC8),
utf8_decode("É") => chr(0xC9),
utf8_decode("Ê") => chr(0xCA),
utf8_decode("Ë") => chr(0xCB),
utf8_decode("ì") => chr(0xEC),
utf8_decode("í") => chr(0xED),
utf8_decode("î") => chr(0xEE),
utf8_decode("ï") => chr(0xEF),
utf8_decode("Ì") => chr(0xCC),
utf8_decode("Í") => chr(0xCD),
utf8_decode("Î") => chr(0xCE),
utf8_decode("Ï") => chr(0xCF),
utf8_decode("ñ") => chr(0xF1),
utf8_decode("Ñ") => chr(0xD1),
utf8_decode("ò") => chr(0xF2),
utf8_decode("ó") => chr(0xF3),
utf8_decode("ô") => chr(0xF4),
utf8_decode("õ") => chr(0xF5),
utf8_decode("ö") => chr(0xF6),
utf8_decode("ø") => chr(0xF8),
utf8_decode("Ò") => chr(0xD2),
utf8_decode("Ó") => chr(0xD3),
utf8_decode("Ô") => chr(0xD4),
utf8_decode("Õ") => chr(0xD5),
utf8_decode("Ö") => chr(0xD6),
utf8_decode("Ø") => chr(0xD8),
utf8_decode("ù") => chr(0xF9),
utf8_decode("ú") => chr(0xFA),
utf8_decode("û") => chr(0xFB),
utf8_decode("ü") => chr(0xFC),
utf8_decode("Ù") => chr(0xD9),
utf8_decode("Ú") => chr(0xDA),
utf8_decode("Û") => chr(0xDB),
utf8_decode("Ü") => chr(0xDC),
utf8_decode("ý") => chr(0xFD),
utf8_decode("ÿ") => chr(0xFF),
utf8_decode("Ý") => chr(0xDD),
utf8_decode("þ") => chr(0xFE),
utf8_decode("Þ") => chr(0xDE)
);
return strtr(str_replace("<br />", " - ", utf8_decode($a_text)), $charmap_latin1);
break;
$charmap_macos = array(
utf8_decode("ß") => chr(0xA7),
utf8_decode("à") => chr(0x88),
utf8_decode("á") => chr(0x87),
utf8_decode("â") => chr(0x89),
utf8_decode("ã") => chr(0x8B),
utf8_decode("ä") => chr(0x8A),
utf8_decode("å") => chr(0x8C),
utf8_decode("æ") => chr(0xBE),
utf8_decode("À") => chr(0xCB),
utf8_decode("Á") => chr(0xE7),
utf8_decode("Â") => chr(0xE5),
utf8_decode("Ã") => chr(0xCC),
utf8_decode("Ä") => chr(0x80),
utf8_decode("Å") => chr(0x81),
utf8_decode("Æ") => chr(0xAE),
utf8_decode("ç") => chr(0x8D),
utf8_decode("Ç") => chr(0x82),
utf8_decode("ð") => chr(0xB6),
utf8_decode("è") => chr(0x8F),
utf8_decode("é") => chr(0x8E),
utf8_decode("ê") => chr(0x90),
utf8_decode("ë") => chr(0x91),
utf8_decode("È") => chr(0xE9),
utf8_decode("É") => chr(0x83),
utf8_decode("Ê") => chr(0xE6),
utf8_decode("Ë") => chr(0xE8),
utf8_decode("ì") => chr(0x93),
utf8_decode("í") => chr(0x92),
utf8_decode("î") => chr(0x94),
utf8_decode("ï") => chr(0x95),
utf8_decode("Ì") => chr(0xED),
utf8_decode("Í") => chr(0xEA),
utf8_decode("Î") => chr(0xEB),
utf8_decode("Ï") => chr(0xEC),
utf8_decode("ñ") => chr(0x96),
utf8_decode("Ñ") => chr(0x84),
utf8_decode("ò") => chr(0x98),
utf8_decode("ó") => chr(0x97),
utf8_decode("ô") => chr(0x99),
utf8_decode("õ") => chr(0x9B),
utf8_decode("ö") => chr(0x9A),
utf8_decode("ø") => chr(0xBF),
utf8_decode("Ò") => chr(0xF1),
utf8_decode("Ó") => chr(0xEE),
utf8_decode("Ô") => chr(0xEF),
utf8_decode("Õ") => chr(0xCD),
utf8_decode("Ö") => chr(0x85),
utf8_decode("Ø") => chr(0xAF),
utf8_decode("ù") => chr(0x9D),
utf8_decode("ú") => chr(0x9C),
utf8_decode("û") => chr(0x9E),
utf8_decode("ü") => chr(0x9F),
utf8_decode("Ù") => chr(0xF4),
utf8_decode("Ú") => chr(0xF2),
utf8_decode("Û") => chr(0xF3),
utf8_decode("Ü") => chr(0x86),
utf8_decode("ý") => chr(0x79),
utf8_decode("ÿ") => chr(0xD8),
utf8_decode("Ý") => chr(0x59),
utf8_decode("þ") => chr(0x20),
utf8_decode("Þ") => chr(0x20)
);
return strtr(str_replace("<br />", " - ", utf8_decode($a_text)), $charmap_macos);
break;
case "unknown":
default:
return $a_text;
}
}

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: