Andrei Zmievski
8dd4e2692c
Fix combining sequence iterators for forward and backward movement.
2006-07-10 20:14:12 +00:00
Andrei Zmievski
63ef7fd050
Implement following() and preceding() for codepoint iterators.
2006-07-08 18:46:24 +00:00
Andrei Zmievski
73b131869c
Implement isBoundary() for code point iterator.
2006-07-07 22:52:26 +00:00
Andrei Zmievski
4757c4ce46
Implement TextIterator::isBoundary() for break iterators.
2006-07-07 22:34:46 +00:00
Andrei Zmievski
abbc1053fd
Implement TextIterator methods following() and preceding().
2006-07-07 21:41:18 +00:00
Andrei Zmievski
769c2a1c1e
Try to make combining sequences work. Not entirely succesful.
2006-06-29 12:32:00 +00:00
Andrei Zmievski
01410e5ae5
Fix codepoint iterators
2006-06-28 15:28:55 +00:00
Antony Dovgal
bfceaaf1d1
unicode_semantics -> unicode.semantics
2006-06-28 15:07:14 +00:00
Andrei Zmievski
b2b4988c12
Use object's copied text (fixes some bug somehow).
2006-06-28 14:44:36 +00:00
Andrei Zmievski
aea38c6ee1
Rework break iterator based implementation to make it more generic for
...
forward and backwards iterators and to return current elements properly.
2006-06-28 14:12:14 +00:00
Andrei Zmievski
ef263f219c
A lot of work on making TextIterator support propert codepoint-level
...
offsets and making it more robust in general.
2006-06-24 21:57:14 +00:00
Andrei Zmievski
72df9946d2
- Remove support for code units in TextIterator (people shouldn't be
...
examining individual code units anyway)
- Add offset() method.
- Add optional locale parameter to the constructor.
2006-06-24 18:18:38 +00:00
Andrei Zmievski
e875205714
Implement user conversion error handler support. Works as normal error
...
handler, in that it can return false to make the default one take over.
Handler signature is:
user_handler($direction, $encoding, $char_byte, $offset, $message)
Also removed support for using exceptions in default error handler.
2006-06-21 20:17:21 +00:00
Andrei Zmievski
37972451f8
Implement unicode_set_error_handler() / unicode_restore_error_handler().
...
The error handler doesn't do anything yet. (vaporware)
2006-06-20 23:00:02 +00:00
Andrei Zmievski
927c5f2eb7
Rename to str_transliterate().
2006-06-15 17:37:48 +00:00
Dmitry Stogov
f6bdedcb5b
Fixed ZTS build
2006-06-15 10:03:52 +00:00
Andrei Zmievski
a093762a6f
transliterate()
2006-06-13 23:46:04 +00:00
Andrei Zmievski
e2a1d7a3e1
Add char_enum_types().
2006-05-09 18:21:27 +00:00
Andrei Zmievski
fad88da96e
Fix and adjust.
2006-05-09 00:15:45 +00:00
Andrei Zmievski
f0dec5c4a4
Add char_enum_names().
2006-05-09 00:06:08 +00:00
Andrei Zmievski
cbe16953e8
Been a long day..
2006-05-08 23:01:20 +00:00
Andrei Zmievski
8a938324e3
And going, and going...
2006-05-08 22:23:57 +00:00
Andrei Zmievski
002b28e5cc
A few more property functinos.
2006-05-08 21:54:44 +00:00
Edin Kadribasic
1483647359
Added constants.c to the windows build
2006-05-08 21:06:34 +00:00
Frank M. Kromann
e7a6d29e95
Adding property.c to windows build
2006-05-05 21:37:08 +00:00
Andrei Zmievski
80f849ac1a
Register slightly under half a metric ton of constants.
2006-05-05 20:56:21 +00:00
Andrei Zmievski
49dbb7710a
Implement char_from_name().
2006-05-04 21:22:30 +00:00
Andrei Zmievski
c631205e0c
Some more work on property/names stuff.
2006-05-04 18:37:12 +00:00
Andrei Zmievski
2c42e06895
Fix locale functions naming problem.
2006-05-04 16:49:33 +00:00
Andrei Zmievski
349d4a7de9
Change prefix to char_ and rename some functions.
2006-05-04 00:01:34 +00:00
Andrei Zmievski
bbde23e247
Some more property functions.
...
# I am pondering a different prefix..
2006-05-03 22:03:10 +00:00
Andrei Zmievski
70acfbe14e
*** empty log message ***
2006-05-03 06:36:53 +00:00
Andrei Zmievski
84c9b4f290
Some additional binary property functions.
2006-05-02 22:43:52 +00:00
Andrei Zmievski
aaed3ca1b0
FALSE on empty string.
2006-05-02 21:49:16 +00:00
Andrei Zmievski
f0640426cb
Implement C/POSIX migration functions.
2006-05-02 21:39:15 +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
Andrei Zmievski
76d6cca78e
Add collator_set_default().
2006-04-21 21:10:01 +00:00
Andrei Zmievski
ec57be524b
Hmm, ZEND_FENTRY() is the only one that allows flags to be added..
2006-04-21 19:40:57 +00:00
Andrei Zmievski
2bbced4bce
Rename i18_loc_* to locale_*.
2006-04-21 19:35:26 +00:00
Andrei Zmievski
24988a088c
Implement collator_get_default() and simplify/fix the underlying code.
...
# Derick, objects aren't that difficult.. :)
2006-04-21 18:25:16 +00:00
Andrei Zmievski
16c55fb25a
Move to refcounted implementation of collators.
2006-04-20 21:56:43 +00:00
Frank M. Kromann
9b93bc74cd
fix build on Win32
2006-04-20 03:41:33 +00:00
Andrei Zmievski
85c36036e5
Update protos.
2006-04-18 21:36:38 +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
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
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
db50082fe9
Add unicode_get_error_mode() and unicode_get_subst_char().
2006-03-26 21:22:59 +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
Andrei Zmievski
1709428494
Implement to-Unicode conversion error behavior. Note the adjusted APIs.
2006-03-26 06:19:24 +00:00