BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
UtfNormalUtil.php File Reference

Functions

 codepointToUtf8 ($codepoint)
 
 utf8ToCodepoint ($char)
 
 escapeSingleString ($string)
 

Detailed Description

Some of these functions are adapted from places in MediaWiki. Should probably merge them for consistency.

Copyright © 2004 Brion Vibber brion.nosp@m.@pob.nosp@m.ox.co.nosp@m.m https://www.mediawiki.org/

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Function Documentation

codepointToUtf8 (   $codepoint)

Return UTF-8 sequence for a given Unicode code point.

Parameters
int$codepoint
Returns
string
Exceptions
InvalidArgumentExceptionif fed out of range data.
Deprecated:
since 1.25, use UtfNormal directly
escapeSingleString (   $string)

Escape a string for inclusion in a PHP single-quoted string literal.

Parameters
string$stringstring to be escaped.
Returns
String: escaped string.
Deprecated:
since 1.25, use UtfNormal directly
utf8ToCodepoint (   $char)

Determine the Unicode codepoint of a single-character UTF-8 sequence. Does not check for invalid input data.

Parameters
string$char
Returns
int
Deprecated:
since 1.25, use UtfNormal directly