Re: cvs: php-src /ext/standard array.c php_array.h /ext/unicode collator.c config.m4 config.w32 php_unicode.h unicode.c

From: Date: Sun, 26 Mar 2006 21:32:41 +0000
Subject: Re: cvs: php-src /ext/standard array.c php_array.h /ext/unicode collator.c config.m4 config.w32 php_unicode.h unicode.c
References: 1  Groups: php.cvs 
Request: Send a blank email to [email protected] to get a copy of this message
Shouldn't it be called unicode_collator.c?

-Andrei


On Mar 26, 2006, at 3:06 AM, Derick Rethans wrote:

derick Sun Mar 26 11:06:24 2006 UTC Added files:
    /php-src/ext/unicode	collator.c
Modified files:
    /php-src/ext/standard	array.c php_array.h
    /php-src/ext/unicode	config.m4 config.w32 php_unicode.h unicode.c
Log: - 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";
?> <derick-20060326110624.txt> --PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


Thread (4 messages)

« previous php.cvs (#37510) next »