CLXVIII. Unicode Functions
Introduction
Unicode Support.
| Warning |
This extension is still in development and it isn't available to public yet. |
Requirements
ICU 3.4 or later is required.
Installation
First you should download and install ICU:
Then checkout latest PHP and configure it --with-icu-dir=<dir> option, where
<dir> was the dir to where you installed ICU. You don't need to
explicitly use this option if you install ICU to a standard location.
Runtime Configuration
The behaviour of these functions is affected by settings in php.ini.
Table 1. Unicode Configuration Options
| Name | Default | Changeable | Changelog |
|---|---|---|---|
| unicode.fallback_encoding | NULL | PHP_INI_ALL | Available since PHP 6.0.0. |
| unicode.from_error_mode | "2" | PHP_INI_ALL | Available since PHP 6.0.0. |
| unicode.from_error_subst_char | "3f" | PHP_INI_ALL | Available since PHP 6.0.0. |
| unicode.http_input_encoding | NULL | PHP_INI_ALL | Available since PHP 6.0.0. |
| unicode.output_encoding | NULL | PHP_INI_ALL | Available since PHP 6.0.0. |
| unicode.runtime_encoding | NULL | PHP_INI_ALL | Available since PHP 6.0.0. |
| unicode.script_encoding | NULL | PHP_INI_ALL | Available since PHP 6.0.0. |
| unicode.semantics | off | PHP_INI_SYSTEM | Available since PHP 6.0.0. |
Here's a short explanation of the configuration directives.
unicode.output_encodingstringDefault encoding for output.
Predefined Constants
The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
- Table of Contents
- unicode_encode -- Set encoding of a unicode string
- unicode_semantics -- Check whether unicode semantics is enabled
