diff options
Diffstat (limited to 'ext/mbstring/php_unicode.c')
-rw-r--r-- | ext/mbstring/php_unicode.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index 75973c9b47..02364ab52b 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -16,16 +16,16 @@ +----------------------------------------------------------------------+ Based on code from ucdata-2.5, which has the following Copyright: - + Copyright 2001 Computing Research Labs, New Mexico State University - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. */ @@ -156,7 +156,7 @@ MBSTRING_API unsigned long php_turkish_tolower(unsigned long code, long l, long { if (code == 0x0049L) { return 0x0131L; - } + } return case_lookup(code, l, r, field); } @@ -279,12 +279,12 @@ MBSTRING_API char *php_unicode_convert_case(int case_mode, const char *srcstr, s if (_src_encoding == mbfl_no_encoding_invalid) { php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"", src_encoding); return NULL; - } + } unicode = php_mb_convert_encoding(srcstr, srclen, "UCS-4BE", src_encoding, &unicode_len); if (unicode == NULL) return NULL; - + unicode_ptr = (unsigned char *)unicode; switch(case_mode) { @@ -303,7 +303,7 @@ MBSTRING_API char *php_unicode_convert_case(int case_mode, const char *srcstr, s break; case PHP_UNICODE_CASE_TITLE: { - int mode = 0; + int mode = 0; for (i = 0; i < unicode_len; i+=4) { int res = php_unicode_is_prop( @@ -315,7 +315,7 @@ MBSTRING_API char *php_unicode_convert_case(int case_mode, const char *srcstr, s php_unicode_tolower(BE_ARY_TO_UINT32(&unicode_ptr[i]), _src_encoding)); } else { mode = 0; - } + } } else { if (res) { mode = 1; @@ -327,7 +327,7 @@ MBSTRING_API char *php_unicode_convert_case(int case_mode, const char *srcstr, s } break; } - + newstr = php_mb_convert_encoding(unicode, unicode_len, src_encoding, "UCS-4BE", ret_len); efree(unicode); |