Commit Graph

33979 Commits

Author SHA1 Message Date
Sara Golemon
30a2bd1d11 Another (and hopefully last) major streams commit.
This moves unicode conversion to the filter layer
(rather than at the lower streams layer)
unicode_filter.c has been moved from ext/unicode to main/streams
as it's an integral part of the streams unicode conversion process.

There are now three ways to set encoding on a stream:

(1) By context
$ctx = stream_context_create(NULL,array('encoding'=>'latin1'));
$fp = fopen('somefile', 'r+t', false, $ctx);

(2) By stream_encoding()
$fp = fopen('somefile', 'r+');
stream_encoding($fp, 'latin1');

(3) By filter
$fp = fopen('somefile', 'r+');
stream_filter_append($fp, 'unicode.from.latin1', STREAM_FILTER_READ);
stream_filter_append($fp, 'unicode.to.latin1', STREAM_FILTER_WRITE);

Note: Methods 1 and 2 are convenience wrappers around method 3.
2006-03-29 01:20:43 +00:00
Yasuo Ohgaki
f028fcecb5 restore E_WARNING in correct place 2006-03-29 01:10:27 +00:00
Antony Dovgal
e98f9777db initialize bucket #0 with nulls 2006-03-28 21:58:21 +00:00
Antony Dovgal
f34d655334 MF51: fix #36897 (debug_print_backtrace() doesn't return void but array(0) {}) 2006-03-28 19:43:37 +00:00
Seiji Masugata
b5cd8f02d8 added mb_strstr( ). 2006-03-28 16:05:16 +00:00
Antony Dovgal
8629171612 fix tests 2006-03-28 09:13:35 +00:00
Antony Dovgal
c5f35d7d95 MF51: fix #36851 (Documentation and code discrepancies for NULL data) 2006-03-28 09:13:22 +00:00
25a73301a5 ChangeLog update 2006-03-28 06:31:49 +00:00
Andrei Zmievski
a65a781b16 Note 2006-03-28 06:30:47 +00:00
Andrei Zmievski
3eee3a5fd6 Fix collator instantiation. 2006-03-28 04:33:29 +00:00
Andrei Zmievski
cbbfebc428 Fix typos. 2006-03-28 03:28:08 +00:00
Ilia Alshanetsky
75c7f810ea MFB51: Check 2nd parameter of tempnam() against path components. 2006-03-27 23:41:05 +00:00
Andrei Zmievski
e85495f6f1 Fix UErrorCode check. 2006-03-27 23:05:38 +00:00
Andrei Zmievski
d761aa7eb2 Typo. 2006-03-27 22:16:53 +00:00
Antony Dovgal
31123e33b3 MF51: fix #36878 (error messages are printed even though an exception has been thrown) 2006-03-27 22:07:50 +00:00
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
Andrei Zmievski
0f3a42a4c1 *** empty log message *** 2006-03-27 19:18:40 +00:00
Andrei Zmievski
978c58ad78 Add UTODO. 2006-03-27 19:15:58 +00:00
Andrei Zmievski
443f9d0844 Mark with UTODO instead of FIXME. 2006-03-27 17:34:06 +00:00
Antony Dovgal
036fc47efb fix possible NULL dereference 2006-03-27 16:43:02 +00:00
Seiji Masugata
d28ec107ac added mb_list_mime_names( ). 2006-03-27 15:20:02 +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
c4d2bc4c46 Fixed test 2006-03-27 14:08:10 +00:00
Dmitry Stogov
daca456e1a Fixed test 2006-03-27 13:53:19 +00:00
Dmitry Stogov
0e114d4295 Fixed test 2006-03-27 13:42:04 +00:00
Dmitry Stogov
c744d73d04 Unicode support 2006-03-27 13:37:47 +00:00
Dmitry Stogov
159bfd55e1 Unicode support 2006-03-27 10:25:35 +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
ba72ff3fcc Fixed bug during function/class declaration in unicode mode 2006-03-27 09:44:03 +00:00
Dmitry Stogov
1c7bc1e012 Fixed test file (test still fail) 2006-03-27 09:42:15 +00:00
Dmitry Stogov
e6a8c7405e Fixed test 2006-03-27 09:39:27 +00:00
Antony Dovgal
d15557fb76 MF51: fix #36869 (memory leak in output buffering when using chunked output) 2006-03-27 08:26:20 +00:00
Dmitry Stogov
d7491a3e7e Fixed meory leak in case of unknown pragma 2006-03-27 08:09:08 +00:00
Dmitry Stogov
3cffaf78a3 Better but incomplete fix for bug #36840 2006-03-27 07:35:05 +00:00
03b5fefd39 ChangeLog update 2006-03-27 06:31:51 +00:00
Dmitry Stogov
bdfa3b1d36 Fixed ZTS build 2006-03-27 06:02:42 +00:00
Andrei Zmievski
5dc7c284f6 MFB 2006-03-27 05:01:48 +00:00
Andrei Zmievski
c2bca6239d Fix a case where we could have an encoding conversion exception thrown
while building exception trace args!
2006-03-27 03:47:50 +00:00
Andrei Zmievski
90d03ff1e2 Use (unsigned char) to make sure that only the control chars are
replaced with '?';
2006-03-27 03:41:39 +00:00
Andrei Zmievski
b36d2dfef6 Rewrite unicode_encode() and unicode_decode() functions. Apply the new
conversion error semantics.
2006-03-27 03:19:30 +00:00
Andrei Zmievski
19e6c92ad0 Skip BOM for UTF-16/32 converters when setting subst char. 2006-03-27 03:17:49 +00:00
Yasuo Ohgaki
0821437bdb remove pg_execute() E_WARNING error when query plan is not defined 2006-03-27 02:59:41 +00:00
Andrei Zmievski
29552a6472 Some functions may want to accept only Unicode or binary strings,
without having auto-conversion from the other string type. Add 'U' and
'S' specifiers for this. Also, remove traces of 'native' strings.
2006-03-27 02:52:06 +00:00
Andrei Zmievski
d6ff037f03 *** empty log message *** 2006-03-26 21:46:01 +00:00
Andrei Zmievski
db50082fe9 Add unicode_get_error_mode() and unicode_get_subst_char(). 2006-03-26 21:22:59 +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
150c896dae ChangeLog update 2006-03-26 06:31:42 +00:00