Commit Graph

4573 Commits

Author SHA1 Message Date
Andrei Zmievski
626be75d6c Make a UTODO note. 2006-03-27 21:19:12 +00:00
Andrei Zmievski
a8c291f8fe Proto updates. 2006-03-27 19:24:18 +00:00
Dmitry Stogov
d1d9ce8fed Test for strtr() with non-ascii encoding 2006-03-27 14:37:14 +00:00
Dmitry Stogov
9d9adb2f35 Unicode support 2006-03-27 14:19:18 +00:00
Dmitry Stogov
c744d73d04 Unicode support 2006-03-27 13:37:47 +00:00
Dmitry Stogov
06cfa710b4 Fixed testFixed testFixed testFixed testFixed testFixed testFixed testFixed testFixed test 2006-03-27 10:15:02 +00:00
Dmitry Stogov
bdfa3b1d36 Fixed ZTS build 2006-03-27 06:02:42 +00:00
Ilia Alshanetsky
3bf02bde43 MFB51: Fixed bug #36857 (Added support for partial content fetching to the
HTTP streams wrapper).
2006-03-26 17:12:26 +00:00
Derick Rethans
ad6a972de3 - Implemented basic collation support. For some reason "new Collator" gives segfaults when the object's collation resource is used.
- The following example shows what is implemented:

<?php
$orig = $strings = array(
    'côte',
    'cote',
    'côté',
    'coté',
    'fluße',
    'flüße',
);

echo "German phonebook:\n";
$c = collator_create( "de@collation=phonebook" );
foreach($c->sort($strings) as $string) {
    echo $string, "\n";
}
echo $c->getAttribute(Collator::FRENCH_COLLATION) == Collator::ON
    ? "With" : "Without", " french accent sorting order\n";

echo "\nFrench with options:\n";
$c = collator_create( "fr" );
$c->setAttribute(Collator::CASE_FIRST, Collator::UPPER_FIRST);
$c->setAttribute(Collator::CASE_LEVEL, Collator::ON);
$c->setStrength(Collator::SECONDARY);
foreach($c->sort($strings) as $string) {
    echo $string, "\n";
}
echo $c->getAttribute(Collator::FRENCH_COLLATION) == Collator::ON
    ? "With" : "Without", " french accent sorting order\n";
?>
2006-03-26 11:06:24 +00:00
Sara Golemon
a64789a452 Expand stream_context_create() to allow specifying params
as well as options.  Ignore the internal name change of the first arg.
The first arg is still for options, the second arg is for actual params.
2006-03-26 04:40:11 +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
Sara Golemon
f67ed7f3d4 Allow bidirectional encoding option via single context param 2006-03-24 22:27:13 +00:00
Sara Golemon
dfc827d108 Fix stream_get_line():
Checking type isn't nearly as important as checking nullness...
2006-03-24 21:37:42 +00:00
Sara Golemon
0b2b16e6c7 Update fgetss() for unicode 2006-03-24 21:32:39 +00:00
Sara Golemon
880dd406f2 Add php_stream_get_record_unicde() API call.
Update stream_get_line() userspace function to handle unicode streams.
2006-03-24 19:22:24 +00:00
Ilia Alshanetsky
96afde2af7 MFB51:
Added myself to PDO and PDO_MySQL credits
Added Wez to PDO_MySQL credits
Added Tony to Q&A team credits
Regenerated the credits file
2006-03-23 18:39:12 +00:00
Antony Dovgal
932c5d9e0e MF51: prevent segfault when exception is thrown from Countable::count() 2006-03-22 22:06:08 +00:00
Antony Dovgal
a4c6a19335 use set_time_limit(), this test takes forever on AIX 2006-03-22 19:27:28 +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
Ilia Alshanetsky
f7875f813c MFB51: Fixed bug #36689 (Removed arbitrary limit on the length of syslog
messages).
2006-03-21 00:59:41 +00:00
Antony Dovgal
c2eabef473 shutdown syslog module before freeing basic_globals 2006-03-20 23:33:07 +00:00
Antony Dovgal
6901e09492 MF51: fix #36808 (syslog ident becomes garbage between requests) 2006-03-20 23:07:31 +00:00
Antony Dovgal
1df7e13f48 fix #36741 (userstreams testcase have off-by-one error on fseek()) 2006-03-20 22:08:59 +00:00
Antony Dovgal
ba1ac82bc9 don't leak memory even though the code is not stable yet 2006-03-20 20:09:20 +00:00
Antony Dovgal
9557d44ed8 fix buffer overrun 2006-03-20 14:10:23 +00:00
Antony Dovgal
2c750d7f84 make the code a bit cleaner - no need for two different checks that are doing effectively the same 2006-03-19 22:12:39 +00:00
Marcus Boerger
792e4d9f4d - Fix TSRM 2006-03-17 23:14:55 +00:00
Andrei Zmievski
25b95e4250 Make is_string() return TRUE for both Unicode and binary strings. 2006-03-17 23:00:20 +00:00
Andrei Zmievski
a75b8f5f35 Fix compiler errors by using NULL_ZSTR where zstr is expected.
# I guess we need to use NULL_ZSTR instead of NULL when passing NULL to
# functions that expect zstr parameter.
2006-03-17 22:52: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
c6b425432a - Actually make this is_binary() too. 2006-03-17 14:53:57 +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
Dmitry Stogov
86780519d4 Disabled dl(). Now it is enabled only when a SAPI layer registers it explicitly. Only CLI, CGI and EMBED do this. 2006-03-16 16:53:10 +00:00
Dmitry Stogov
9d7ca01c8b Dropped allow_call_time_pass_reference, the error is maden E_STRICT. 2006-03-16 11:32:00 +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
Derick Rethans
52bec1ea36 - Reduce space in serialization. The first 128 bytes will now use just the
character and everything above will use \uXXXX. It seems that unserialize
  doesn't work at all yet on the U: element so that I added to my to-do list.
2006-03-15 09:50:47 +00:00
Sara Golemon
df77705572 Switch (zstr) casts to use ZSTR() macro. 2006-03-15 00:28:57 +00:00
Sara Golemon
b576354982 More stream updates.
fgets() will work now as will anything which calls one of the
_php_stream_get_line() family of functions.
The one exception here is when the legacy defines are used on a unicode
stream.  At the moment they'll simply return NULL, I'll update these
to do sloppy conversion in a bit.

'make (u)test' still doesn't work, but it's a different doesn't work.
2006-03-14 21:15:05 +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
Derick Rethans
f7bfe18307 This makes file_put_contents() work for:
<?php
    declare(encoding="latin1");
    $a = "1234å67890";
    file_put_contents( "/tmp/testuc.1", $a);
    file_put_contents( "/tmp/testuc.2", (string) $a);

    $context = stream_context_create();
    stream_context_set_params($context, array( "output_encoding" => "latin1" ) );
    file_put_contents( "/tmp/testuc.3", $a, FILE_TEXT, $context);
    file_put_contents( "/tmp/testuc.4", (string) $a, FILE_TEXT, $context);
?>

But it still throws a warning on ".3". It's a small design issue that I
didn't want to touch right now.
2006-03-13 15:01:44 +00:00
Ilia Alshanetsky
fef63cd5e5 MFB51: Added overflow checks to wordwrap() function. 2006-03-13 14:37:32 +00:00
Sara Golemon
48798021b5 Refactor streams layer for PHP6.
Don't be frightened by the size of this commit.
A significant portion of it is restoring the read buffer semantics back
to what PHP4/5 use.  (Or a close aproximation thereof).

See main/streams/streams.c and ext/standard/file.c for a set of
UTODO comments covering work yet to be done.
2006-03-13 04:40:11 +00:00
Dmitry Stogov
cebd9e8f30 Fixed debug_zval_dump() to support private and protected members 2006-03-10 08:43:14 +00:00
Michael Wallner
9656a34cbc MFB: Fix bug #36656 (http_build_query generates invalid URIs due to use of square brackets) 2006-03-08 22:04:48 +00:00
Ilia Alshanetsky
27e175eef0 So long safe_mode mode.
Also removed the magic_quotes configure option, no longer relevant since
the magic is gone :-).
2006-03-08 14:41:45 +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
Ilia Alshanetsky
edd7d2a1df Fixed bug #36630 (umask not reset at the end of the request).
# This needs to be MFHed, but since it requires an API break it has to wait
# until the next minor release.
2006-03-06 14:27:45 +00:00
Derick Rethans
72c9d907d3 - And not here either... 2006-03-05 19:02:11 +00:00