Commit Graph

551 Commits

Author SHA1 Message Date
Andrei Zmievski
f717e25ce7 FIXME note 2006-07-13 22:26:50 +00:00
Andrei Zmievski
2fbc36496f - Let the caller output a warning instead of having
zend_get_unified_string_type() do it.
- Mark a few more functions are Unicode compatible.
2006-07-13 21:27:48 +00:00
Antony Dovgal
87d846c2cb initialize variables 2006-07-13 17:55:50 +00:00
Antony Dovgal
9de18e2ca2 don't try to compare strings if haystack is "" or shorter than needle
add test
2006-07-12 12:33:04 +00:00
Antony Dovgal
a6e26b742a fix off-by-one in addslashes() in Unicode mode 2006-06-30 09:35:21 +00:00
Hannes Magnusson
bf0a79d381 Updated protos
Fixed vim folding
2006-06-25 19:19:31 +00:00
Hannes Magnusson
53d262c04d Nuke unused var 2006-06-11 20:33:29 +00:00
Ilia Alshanetsky
6434512a05 MFB: Improved performance of str_replace() when doing 1 char to 1 char or 1
char to many chars replacement by 30-40%.
2006-06-10 15:51:23 +00:00
Johannes Schlüter
40da89d6b9 - Fix str_replace with unicode strings as key 2006-05-28 21:09:58 +00:00
Ilia Alshanetsky
7dd87b5307 MFB: Fixed bug #37394 (substr_compare() returns an error when offset equals
string length).
2006-05-10 13:07:56 +00:00
Antony Dovgal
7bde7e87eb MF51: fix possible substr_compare() crash
add new tests
2006-04-25 12:49:04 +00:00
Andrei Zmievski
efd298e2eb I'm not sure what the heck people were thinking here, but it should be
fixed finally. Please test.
2006-04-18 05:18:12 +00:00
Andrei Zmievski
6b336175a6 Fix trim("a") bug. 2006-04-18 02:40:29 +00:00
Antony Dovgal
0b0fff07b2 fix spelling in error messages:
greater/less thEn -> greater/less thAn
2006-04-03 09:14:50 +00:00
Andrei Zmievski
d57e79782e Bug! 2006-03-29 05:56:06 +00:00
Andrei Zmievski
e85495f6f1 Fix UErrorCode check. 2006-03-27 23:05:38 +00:00
Dmitry Stogov
bdfa3b1d36 Fixed ZTS build 2006-03-27 06:02:42 +00:00
Derick Rethans
3df5f17231 - Commit intermediate work so that I can hack on it on some plane. 2006-03-26 02:15:47 +00:00
Derick Rethans
3056defb26 - Moved strtotitle to ext/standard and implemented the fallback case to
non-unicode with ucwords. There is also an implementation for unicode ucwords
  but that returns different results then strtotitle as it uppercases the
  first character of every word, and doesn't *titlecase* a word. The test case
  shows that.
2006-03-22 10:20:20 +00:00
Marcus Boerger
792e4d9f4d - Fix TSRM 2006-03-17 23:14:55 +00:00
Andrei Zmievski
6b165251db Calculate the size of the tmp[] buffer directly at compile time. 2006-03-17 22:51:20 +00:00
Derick Rethans
2ffc93140d - Fixed bug in ucfirst() implementation. If the tmp_len = 0 then it will not
write the uppercased character to the buffer, but only returns the length of
  the uppercased letter as per
  http://icu.sourceforge.net/apiref/icu4c/ustring_8h.html#a50.
- Updated is_string():
  If Unicode semantics is turned on, return "true" for Unicode strings only.
  If Unicode semantics is turned off, return "true" for native strings only.
- Added is_binary() function that returns "true" for native strings only.
- Added first implementation of upgraded strtr function. It works except if
  combining sequences or surrogates are used in the non-array method of calling
  this function.
2006-03-17 14:29:05 +00:00
Derick Rethans
c76917a773 - Fixed two memory issues:
- In the first one we were calculating the tmp_len wrong which made the
	u_strFromUTF32() function try to convert too many code points.
  - The second issue was a bit more subtle as the "what" string wasn't
	duplicated but still modified. This string is passed as data to the
	function and this kind of data the engine tries to free when the function
	ends. Because we were re-allocating the data the original memory location
	was already freed resulting in a double free error when the engine tries to
	free the argument as it was passed to the function.
2006-03-15 12:20:49 +00:00
Antony Dovgal
49ec971d85 add brackets and clarity 2006-03-14 15:14:59 +00:00
Ilia Alshanetsky
24d06926d4 MFB51: Fixed offset/length parameter validation in substr_compare() function. 2006-03-14 14:55:27 +00:00
Ilia Alshanetsky
fef63cd5e5 MFB51: Added overflow checks to wordwrap() function. 2006-03-13 14:37:32 +00:00
Pierre Joye
bb1ec86f9d - remove magic_quotes_gpc, magic_quotes_runtime, magic_quotes_sybase
(calling ini_set('magic_....') returns 0|false
- get_magic_quotes_gpc, get_magic_quotes_runtime are kept but always return false
- set_magic_quotes_runtime raises an E_CORE_ERROR
2006-03-08 00:43:32 +00:00
Andrei Zmievski
da831e6e0c Fix protos to use 'string' for parameters that can be either binary or
unicode.
2006-03-06 21:49:21 +00:00
Dmitry Stogov
b86007f0e1 ZTS fix 2006-03-03 08:50:25 +00:00
Andrei Zmievski
c5f6efe367 Fix ucwords() to use full case mapping.
# Note that this is different from i18n_strtotitle() which uses
# locale-aware word break iterator. The difference is seen here:
#
# $a = "pouvez-vous";
# var_dump(ucwords($a));
# var_dump(i18n_strtotitle($a));
#
# Outputs:
#
# unicode(11) "Pouvez-vous"
# unicode(11) "Pouvez-Vous"
#
2006-03-02 23:12:33 +00:00
Andrei Zmievski
1751241203 - Update protos for Unicode-upgraded functions
- Also fix ucfirst() to use full case mapping, so that ß (sharp s)
  maps to 'SS' for example
2006-03-02 20:37:07 +00:00
Dmitry Stogov
c366cc6d1a Nuke int32_t (everywhere except streams layer) and signed/unsigned warnings 2006-03-02 13:12:45 +00:00
Rob Richards
06a4265712 64-bit fixes - ("make test" now works again on these platforms) 2006-03-01 11:19:35 +00:00
Dmitry Stogov
0f1209ab3d Portable unicode string API:
- use the same type (int) for zval.value.usr.len and zval.value.str.len
  - use union "zstr" as char*/UChar* mixture instead of void*
  - Z_UNISTR() and Z_UNILEN() no longer check for Z_TYPE()
  - nuke int32_t from ZE (not finisned)
2006-02-21 20:12:43 +00:00
Pierre Joye
d10b1290b2 - #36185 str_rot13(NULL) crash 2006-01-28 00:13:13 +00:00
Andrei Zmievski
e7752216f4 Use zend_codepoint_to_uchar() macro. 2006-01-25 00:02:23 +00:00
Andrei Zmievski
0fe1845267 eurealloc() should not be used with UBYTES() 2006-01-24 23:09:43 +00:00
Dmitry Stogov
227295a4f1 Unicode stuff is changed according to decision maden on PDM.
Now IS_BINRAY data type is removed and IS_STRING starts behave as IS_BINARY in unicode mode. IS_STRING is incompatible with IS_UNICODE, so ALL functions should be improved to support unicode mode.
2006-01-17 12:18:53 +00:00
Antony Dovgal
16be5ff45b fix typo 2006-01-05 20:49:28 +00:00
foobar
251c5173fd bump year and license version 2006-01-01 13:10:10 +00:00
Antony Dovgal
41fad0ad77 fix spelling and #35665 2005-12-14 00:54:04 +00:00
Antony Dovgal
749c6e3016 fix #35617
no need to separate zvals twice
2005-12-09 22:26:39 +00:00
Dmitry Stogov
7810872573 Support for 64-bit platforms 2005-12-09 13:41:06 +00:00
foobar
0ac2b74b0b - Nuke php3 legacy 2005-12-05 22:53:34 +00:00
Ilia Alshanetsky
7f66777bbf MFB51: Fixed bug #35427 (str_word_count() handles '-' incorrectly). 2005-11-29 16:14:47 +00:00
Derick Rethans
574a210973 - Fixed protos. 2005-11-12 14:56:35 +00:00
Frank M. Kromann
82c00c179d Make sure haystack_len is initialized before it's used 2005-10-28 19:29:29 +00:00
Rolland Santimano
37d12b82b3 - Unicode impl of strrchr() 2005-10-24 14:35:02 +00:00
Rolland Santimano
a948324778 - php_u_stristr: Remove leading back-slash ... sheesh 2005-10-22 13:36:55 +00:00
Rolland Santimano
68487a234e - php_u_stristr: s/codepts/codepoints/ - make Jani happy 2005-10-22 13:32:51 +00:00