ILIAS
Release_4_0_x_branch Revision 61816
|
Static Public Member Functions | |
static | getIsMbstringEnabled () |
Get whether mbstring extension is available. | |
static | getIsIconvEnabled () |
Get whether iconv extension is available. | |
static | ControlCharacterOOXML2PHP ($value= '') |
Convert from OpenXML escaped control character to PHP control character. | |
static | ControlCharacterPHP2OOXML ($value= '') |
Convert from PHP control character to OpenXML escaped control character. | |
static | SanitizeUTF8 ($value) |
Try to sanitize UTF8, stripping invalid byte sequences. | |
static | IsUTF8 ($value= '') |
Check if a string contains UTF8 data. | |
static | FormatNumber ($value) |
Formats a numeric value as a string for output in various output writers forcing point as decimal separator in case locale is other than English. | |
static | UTF8toBIFF8UnicodeShort ($value) |
Converts a UTF-8 string into BIFF8 Unicode string data (8-bit string length) Writes the string using uncompressed notation, no rich text, no Asian phonetics If mbstring extension is not available, ASCII is assumed, and compressed notation is used although this will give wrong results for non-ASCII strings see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. | |
static | UTF8toBIFF8UnicodeLong ($value) |
Converts a UTF-8 string into BIFF8 Unicode string data (16-bit string length) Writes the string using uncompressed notation, no rich text, no Asian phonetics If mbstring extension is not available, ASCII is assumed, and compressed notation is used although this will give wrong results for non-ASCII strings see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. | |
static | ConvertEncoding ($value, $to, $from) |
Convert string from one encoding to another. | |
static | CountCharacters ($value, $enc= 'UTF-8') |
Get character count. | |
static | Substring ($pValue= '', $pStart=0, $pLength=0) |
Get a substring of a UTF-8 encoded string. |
Static Private Member Functions | |
static | _buildControlCharacters () |
Build control characters array. |
Static Private Attributes | |
static | $_controlCharacters = array() |
static | $_isMbstringEnabled |
static | $_isIconvEnabled |
Definition at line 36 of file String.php.
|
staticprivate |
Build control characters array.
Definition at line 62 of file String.php.
Referenced by ControlCharacterOOXML2PHP(), and ControlCharacterPHP2OOXML().
|
static |
Convert from OpenXML escaped control character to PHP control character.
That's correct, control characters are stored directly in the shared-strings table. We do encode characters that cannot be represented in XML using the following escape sequence: xHHHH where H represents a hexadecimal character in the character's value... So you could end up with something like x0008 in a string (either in a cell value (<v>) element or in the shared string <t> element.
string | $value | Value to unescape |
Definition at line 120 of file String.php.
References _buildControlCharacters().
Referenced by PHPExcel_Reader_Excel2007\_parseRichText(), and PHPExcel_Reader_Excel2007\load().
|
static |
Convert from PHP control character to OpenXML escaped control character.
That's correct, control characters are stored directly in the shared-strings table. We do encode characters that cannot be represented in XML using the following escape sequence: xHHHH where H represents a hexadecimal character in the character's value... So you could end up with something like x0008 in a string (either in a cell value (<v>) element or in the shared string <t> element.
string | $value | Value to escape |
Definition at line 142 of file String.php.
References _buildControlCharacters().
Referenced by PHPExcel_Writer_Excel2007_Worksheet\_writeCell(), PHPExcel_Writer_Excel2007_StringTable\writeRichText(), and PHPExcel_Writer_Excel2007_StringTable\writeStringTable().
|
static |
Convert string from one encoding to another.
First try mbstring, then iconv, or no convertion
string | $value | |
string | $to | Encoding to convert to, e.g. 'UTF-8' |
string | $from | Encoding to convert from, e.g. 'UTF-16LE' |
Definition at line 256 of file String.php.
Referenced by PHPExcel_Reader_Excel5\_decodeCodepage(), PHPExcel_Reader_Excel5\_encodeUTF16(), PHPExcel_Writer_Excel5_Worksheet\_writeUrlInternal(), UTF8toBIFF8UnicodeLong(), and UTF8toBIFF8UnicodeShort().
|
static |
Get character count.
First try mbstring, then iconv, finally strlen
string | $value | |
string | $enc | Encoding |
Definition at line 279 of file String.php.
References $enc.
Referenced by PHPExcel_Writer_Excel5_Workbook\_writeDefinedNameBiff8(), PHPExcel_Writer_Excel5_Worksheet\_writeUrlInternal(), PHPExcel_Worksheet\setTitle(), UTF8toBIFF8UnicodeLong(), and UTF8toBIFF8UnicodeShort().
|
static |
Formats a numeric value as a string for output in various output writers forcing point as decimal separator in case locale is other than English.
mixed | $value |
Definition at line 189 of file String.php.
Referenced by PHPExcel_Writer_Excel2007_Worksheet\_writeCell(), PHPExcel_Writer_Excel2007_Worksheet\_writeCols(), PHPExcel_Writer_Excel2007_Worksheet\_writePageMargins(), PHPExcel_Writer_Excel2007_Worksheet\_writeSheetData(), and PHPExcel_Writer_Excel2007_Worksheet\_writeSheetFormatPr().
|
static |
Get whether iconv extension is available.
Definition at line 94 of file String.php.
References $_isIconvEnabled.
Referenced by UTF8toBIFF8UnicodeLong(), and UTF8toBIFF8UnicodeShort().
|
static |
Get whether mbstring extension is available.
Definition at line 77 of file String.php.
References $_isMbstringEnabled.
Referenced by UTF8toBIFF8UnicodeLong(), and UTF8toBIFF8UnicodeShort().
|
static |
Check if a string contains UTF8 data.
string | $value |
Definition at line 178 of file String.php.
|
static |
Try to sanitize UTF8, stripping invalid byte sequences.
Not perfect. Does not surrogate characters.
string | $value |
Definition at line 156 of file String.php.
Referenced by PHPExcel_Cell_DefaultValueBinder\bindValue(), and PHPExcel_Cell_AdvancedValueBinder\bindValue().
|
static |
Get a substring of a UTF-8 encoded string.
string | $pValue | UTF-8 encoded string |
int | $start | Start offset |
int | $length | Maximum number of characters in substring |
Definition at line 304 of file String.php.
Referenced by PHPExcel_Cell\setValueExplicit().
|
static |
Converts a UTF-8 string into BIFF8 Unicode string data (16-bit string length) Writes the string using uncompressed notation, no rich text, no Asian phonetics If mbstring extension is not available, ASCII is assumed, and compressed notation is used although this will give wrong results for non-ASCII strings see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect.
2.5.3
string | $value | UTF-8 encoded string |
Definition at line 232 of file String.php.
References $data, ConvertEncoding(), CountCharacters(), getIsIconvEnabled(), and getIsMbstringEnabled().
Referenced by PHPExcel_Writer_Excel5_Worksheet\_storeFooter(), PHPExcel_Writer_Excel5_Worksheet\_storeHeader(), PHPExcel_Writer_Excel5_Workbook\_storeNumFormat(), PHPExcel_Writer_Excel5_Worksheet\_storeRangeProtection(), PHPExcel_Writer_Excel5_Workbook\_writeDefinedNameBiff8(), and PHPExcel_Writer_Excel5_Worksheet\_writeLabelSst().
|
static |
Converts a UTF-8 string into BIFF8 Unicode string data (8-bit string length) Writes the string using uncompressed notation, no rich text, no Asian phonetics If mbstring extension is not available, ASCII is assumed, and compressed notation is used although this will give wrong results for non-ASCII strings see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect.
2.5.3
string | $value | UTF-8 encoded string |
Definition at line 206 of file String.php.
References $data, ConvertEncoding(), CountCharacters(), getIsIconvEnabled(), and getIsMbstringEnabled().
Referenced by PHPExcel_Writer_Excel5_Workbook\_calcSheetOffsets(), PHPExcel_Writer_Excel5_Parser\_convertString(), PHPExcel_Writer_Excel5_Workbook\_storeBoundsheet(), and PHPExcel_Writer_Excel5_Font\writeFont().
|
staticprivate |
Definition at line 43 of file String.php.
|
staticprivate |
Definition at line 57 of file String.php.
Referenced by getIsIconvEnabled().
|
staticprivate |
Definition at line 50 of file String.php.
Referenced by getIsMbstringEnabled().