This package is not being maintained. I have kept it available for historical interest only.
This package contains a PHP include file (utf8.inc) which provides two functions: utf8ToUnicode
and unicodeToUtf8
. They convert between UTF-8 strings and arrays of ints representing Unicode code points (sort of UCS-4).
Astral planes are supported. Surrogates are not allowed. Occurrences of the BOM are ignored. PHP multibyte string support is not required.
The code has been adapted from the UTF-8 to UTF-16 and UTF-16 to UTF-8 converters of Mozilla. Hence, the code is provided under an NPL 1.1/GPL 2.0/LGPL 2.1 tri-license.