diff options
author | Marcus Boerger <helly@php.net> | 2006-02-13 09:20:19 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2006-02-13 09:20:19 +0000 |
commit | 83f1271312d794c0fbfadf1443936a5cd3b3891a (patch) | |
tree | 58b7391795c50cc8a4a7dcb71fc359b77e206dc6 /ext | |
parent | 7e09f0686d3c91d451e54a403bcd94091e8109ff (diff) | |
download | php-git-83f1271312d794c0fbfadf1443936a5cd3b3891a.tar.gz |
- Add unicode_enabled() to check whether unicode_semantics is on
Diffstat (limited to 'ext')
-rw-r--r-- | ext/unicode/unicode.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/unicode/unicode.c b/ext/unicode/unicode.c index a1c5328fe7..4382b45adb 100644 --- a/ext/unicode/unicode.c +++ b/ext/unicode/unicode.c @@ -68,6 +68,14 @@ static PHP_FUNCTION(unicode_decode) } /* }}} */ +/* {{{ proto bool unicode_enabled() + Check whether unicode semantics is enabled */ +static PHP_FUNCTION(unicode_enabled) +{ + RETURN_BOOL(UG(unicode)); +} +/* }}} */ + /* {{{ proto string unicode_encode(unicode input, string encoding) Takes a unicode string and converts it to a string in the specified encoding */ static PHP_FUNCTION(unicode_encode) @@ -109,6 +117,7 @@ zend_function_entry unicode_functions[] = { PHP_FE(i18n_loc_get_default, NULL) PHP_FE(i18n_loc_set_default, NULL) PHP_FE(unicode_decode, NULL) + PHP_FE(unicode_enabled, NULL) PHP_FE(unicode_encode, NULL) PHP_FE(i18n_strtotitle, NULL) { NULL, NULL, NULL } |