Skip to content
echiong edited this page Oct 25, 2012 · 62 revisions

##Class CI_Utf8

Utf8 Class

Provides support for UTF-8 environments

Package: [[CodeIgniter<a href="Package CodeIgniter.Libraries.md">Libraries]]
Category: UTF-8
Author: ExpressionEngine Dev Team
Link: http://codeigniter.com/user_guide/libraries/utf8.html
Located at system/core/Utf8.php

##Methods summary


public __construct ( )

Constructor

Determines if UTF-8 support is to be enabled


public string clean_string ( string $str )

Clean UTF-8 strings

Ensures strings are UTF-8

Parameters

$str string

Returns string


public string 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

Parameters

$str string

Returns string


public string convert_to_utf8 ( string $str, string $encoding )

Convert to UTF-8

Attempts to convert a string to UTF-8

Parameters

$str string

$encoding string
- input encoding

Returns string


public boolean _is_ascii ( string $str )

Is ASCII?

Tests if a string is standard 7-bit ASCII or not

Parameters

$str string

Returns boolean

Packages

Classes

Exceptions

Functions

Clone this wiki locally