Commit Graph

11 Commits

Author SHA1 Message Date
Jani Taskinen
174c1c5329 - Removed unnecessary stuff 2007-07-12 16:08:26 +00:00
Andrei Zmievski
a093762a6f transliterate() 2006-06-13 23:46:04 +00:00
Andrei Zmievski
80f849ac1a Register slightly under half a metric ton of constants. 2006-05-05 20:56:21 +00:00
Andrei Zmievski
675ecc637b Add skeleton for character property file. Also remove some HAVE_UNICODE
tests since it's non optional.
2006-05-02 20:58:30 +00:00
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
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
Derick Rethans
c86cf4fbea - Make ext/unicode an extension that is always there and can not be disabled. 2006-03-21 13:56:50 +00:00
Andrei Zmievski
d4c929764a Proof-of-concept for TextIterator. Much more work to be done here. 2006-02-01 23:50:50 +00:00
foobar
9b7a28e9a2 fix configure help 2005-11-10 08:04:57 +00:00
foobar
3ed4aee952 - Some minor fixes 2005-08-12 09:10:04 +00:00
Andrei Zmievski
264cec8be6 Unicode support. 2005-08-11 23:36:07 +00:00