-
Notifications
You must be signed in to change notification settings - Fork 0
CI_Utf8
Mathieu Nayrolles edited this page Jan 20, 2016
·
1 revision
Utf8 Class
Provides support for UTF-8 environments
- Class name: CI_Utf8
- Namespace:
void CI_Utf8::__construct()
Class constructor
Determines if UTF-8 support is to be enabled.
- Visibility: public
string CI_Utf8::clean_string(string $str)
Clean UTF-8 strings
Ensures strings contain only valid UTF-8 characters.
- Visibility: public
- $str string - <p>String to clean</p>
string CI_Utf8::safe_ascii_for_xml(string $str)
Remove ASCII control characters
Removes all ASCII control characters except horizontal tabs, line feeds, and carriage returns, as all others can cause problems in XML.
- Visibility: public
- $str string - <p>String to clean</p>
string CI_Utf8::convert_to_utf8(string $str, string $encoding)
Convert to UTF-8
Attempts to convert a string to UTF-8.
- Visibility: public
- $str string - <p>Input string</p>
- $encoding string - <p>Input encoding</p>
boolean CI_Utf8::is_ascii(string $str)
Is ASCII?
Tests if a string is standard 7-bit ASCII or not.
- Visibility: public
- $str string - <p>String to check</p>