Function cApiStrRecodeString
Converts a string to another encoding. This function tries to detect which function to use (either recode or iconv).
If $sourceEncoding and $targetEncoding are the same, this function returns immediately.
For more information about encodings, refer to http://en.wikipedia.org/wiki/Character_encoding
For more information about the supported encodings in recode, refer to http://www.delorie.com/gnu/docs/recode/recode_toc.html
Note: depending on whether recode or iconv is used, the supported charsets differ. The following ones are commonly used and are most likely supported by both converters:
- ISO-8859-1 to ISO-8859-15
- ASCII
- UTF-8
Package: Core\Backend
Deprecated: [2015-05-21] use cString::recodeString
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Timo Hummel
Todo: Check if the charset names are the same for both converters
Todo: Implement a converter and charset checker to ensure compilance.
Located at includes/functions.api.string.php
Deprecated: [2015-05-21] use cString::recodeString
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Timo Hummel
Todo: Check if the charset names are the same for both converters
Todo: Implement a converter and charset checker to ensure compilance.
Located at includes/functions.api.string.php
string |
$sString |
The string to operate on |
string |
$sourceEncoding |
The source encoding (default: ISO-8859-1) |
string |
$targetEncoding |
The target encoding (if false, use source encoding) |
string
|
The resulting string |