Commit Graph

373 Commits

Author SHA1 Message Date
Gustavo André dos Santos Lopes
2498c90c71 Readded accidentally removed line 2012-07-22 04:22:23 +02:00
Gustavo André dos Santos Lopes
2f0775b999 Added IntlDateFormatter::formatObject(). Refactor
To better support IntlCalendar, added this function:

string IntlDateFormatter::formatObject(IntlCalendar|DateTime $obj [,
	array|int|string $format = null [, string $locale = null).

$format is either of the constants IntlDateFormatter::FULL, etc., in
which case this format applies to both the date and the time, an array
in the form array($dateFormat, $timeFormat), or a string with the
SimpleDateFormat pattern.

This uses both the Calendar type and the timezone of the passed object
to configure the formatter (a GregorianCalendar is forced for
DateTime).

Some stuff was moved around and slighlt modified to allow for more code
reuse.
2012-07-22 04:22:23 +02:00
Felipe Pena
f94051ea11 - Fix conflict 2012-07-14 12:23:24 -03:00
Felipe Pena
0bff7cfadd - Fixed bug #62565 (Crashes due non-initialized internal properties_table) 2012-07-14 12:16:16 -03:00
Felipe Pena
44cdcb7fdb Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed bug #62564 (Extending MessageFormatter and adding property causes crash)
2012-07-14 11:37:20 -03:00
Felipe Pena
8b093dee21 - Fixed bug #62564 (Extending MessageFormatter and adding property causes crash) 2012-07-14 11:37:08 -03:00
Gustavo André dos Santos Lopes
46629e35ff Refactored internal_get_timestamp()
Added bounds checking for 32-bit ints.

Do not fetch array elements that ::parse() generates but that
::format() does not actually care about.y
2012-07-02 00:26:38 +02:00
Gustavo André dos Santos Lopes
2416719fb1 Unified zval -> UDate conversions
Now IntlDateFormatter::format() also accepts IntlCalendar objects.
Code is shared in MessageFormatter and IntlDateFormatter.
2012-07-02 00:24:54 +02:00
Stanislav Malyshev
a3322f8927 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed the common misspelling of the word occurred (occured -> occurred)
2012-06-30 17:00:25 -07:00
Marc Easen
896ac689c9 Fixed the common misspelling of the word occurred (occured -> occurred) 2012-06-30 16:54:03 -07:00
Felipe Pena
8d264dba93 - Fixed build 2012-06-27 09:01:02 -03:00
Gustavo André dos Santos Lopes
75964450ed Merge branch 'break_iterator'
* break_iterator:
  Fix typo in error message
  BreakIterator: fix compat with old ICU versions
  Fix build error one ext/intl
  BreakIterator::getPartsIterator: new optional arg
  Added IntlCodePointBreakIterator.
  Add Intl prefix to BreakIterator/RuleBasedBI
  Remove trailing space
  Replaced zend_parse_method_params with plain zpp
  BreakIter: Removed getAvailableLocales/getHashCode
  Change in BreakIterator::getPartsIterator()
  BreakIterator: add rules status constants
  Tests for (RuleBased)BreakIterator.
  BreakIterator and RuleBasedBreakiterator added
2012-06-25 12:11:49 +02:00
Gustavo André dos Santos Lopes
0df73a85e1 Fix typo in error message 2012-06-25 12:06:31 +02:00
Gustavo André dos Santos Lopes
d8b067e66f BreakIterator: fix compat with old ICU versions 2012-06-25 12:05:13 +02:00
Gustavo André dos Santos Lopes
5a9dca458a Fix build error one ext/intl 2012-06-25 11:53:20 +02:00
Gustavo André dos Santos Lopes
715e59ad82 Duplicate test for ICU 49
The output in ICU < 49 actually seems wrong here; ICU 49 seems to
fix the data.
2012-06-25 11:13:23 +02:00
Gustavo André dos Santos Lopes
9c5074a484 Fix undeclared intl_locale_get_default()
This was causing segfaults at least in the resourcebundle
constructor.

Also moved intl_locale_get_default() to a more central location
and fixed a constness warning in resourcebundle_ctor().
2012-06-25 10:59:58 +02:00
Gustavo André dos Santos Lopes
77daa3482d BreakIterator::getPartsIterator: new optional arg
Can take one of:
* IntlPartsIterator::KEY_SEQUENTIAL (keys are 0, 1, ...)
* IntlPartsIterator::KEY_LEFT (keys are left boundaries)
* IntlPartsIterator::KEY_LEFT (keys are right boundaries)

The default is IntlPartsIterator::KEY_SEQUENTIAL (the previous behavior).
2012-06-22 18:52:06 +02:00
Gustavo André dos Santos Lopes
0a7ae87e91 Added IntlCodePointBreakIterator.
Objects of this class can be instantiated with

IntlBreakIterator::createCodePointInstance()

The method does not take a locale, as it would not make sense in this
context.

This class has one additional method:

long IntlCodePointIterator::getLastCodePoint()

which returns either -1 or the last code point we moved over, if any
(and discounting any movement before the last call to
IntlBreakIterator::first() or IntlBreakIterator::last()).
2012-06-22 18:19:54 +02:00
Gustavo André dos Santos Lopes
cee31091a9 Add Intl prefix to BreakIterator/RuleBasedBI 2012-06-10 22:42:38 +02:00
Gustavo André dos Santos Lopes
87dd0269ba Remove trailing space 2012-06-10 13:26:28 +02:00
Gustavo André dos Santos Lopes
a4925fae9b Replaced zend_parse_method_params with plain zpp 2012-06-10 00:23:09 +02:00
Gustavo André dos Santos Lopes
afed66bb9e BreakIter: Removed getAvailableLocales/getHashCode 2012-06-10 00:05:00 +02:00
Gustavo André dos Santos Lopes
4ec75539db Change in BreakIterator::getPartsIterator()
BreakIterator::getPartsIterator() now returns an IntlIterator subclass
with a special method, getBreakIterator(), that returns the
associated BreakIterator.

Any call to getRuleStatus() is forwarded to the BreakIterator.
2012-06-10 00:04:53 +02:00
Xinchen Hui
07d0eab204 Merge branch 'PHP-5.4'
By Gustavo André dos Santos Lopes (4) and others
via Felipe Pena (2) and Xinchen Hui (2)
* PHP-5.4:
  Remove unused codes
  based on microsoft's description,the direct convert from FILETIME struct to __int64 is unsafe.
  merge 5.3 entries
  restore NEWS
  Fix ext/intl build on ICU < 4.8
  Optimization in ext/intl/msgformat
  Fixed tests in ext/intl
  Changed XFAILed collator_get_sort_key.phpt
2012-06-07 14:42:35 +08:00
Xinchen Hui
83542dcf3b Merge branch 'PHP-5.3' into PHP-5.4
By Gustavo André dos Santos Lopes (4) and others
via Felipe Pena (1) and Xinchen Hui (1)
* PHP-5.3:
  Remove unused codes
  based on microsoft's description,the direct convert from FILETIME struct to __int64 is unsafe.
  Fix ext/intl build on ICU < 4.8
  Optimization in ext/intl/msgformat
  Fixed tests in ext/intl
  Changed XFAILed collator_get_sort_key.phpt
2012-06-07 14:32:47 +08:00
Gustavo André dos Santos Lopes
c1ac325228 Fix ext/intl build on ICU < 4.8 2012-06-06 12:10:00 +02:00
Gustavo André dos Santos Lopes
52d541a314 Optimization in ext/intl/msgformat
Don't transform the string to make it apostrophe friendly in ICU 4.8+
as that it is now the default.
2012-06-06 11:36:00 +02:00
Gustavo André dos Santos Lopes
45b3fa4dee Fixed tests in ext/intl
21 is not a valid value for UNUM_PADDING_POSITION. Changed the test to
use 2 instead.

Remove ICU 4.2- test. No one cares.
2012-06-05 16:47:00 +02:00
Gustavo André dos Santos Lopes
c6593a0e9b BreakIterator: add rules status constants 2012-06-04 23:09:10 +02:00
Gustavo André dos Santos Lopes
036b1eb291 Tests for (RuleBased)BreakIterator. 2012-06-04 22:25:08 +02:00
Gustavo André dos Santos Lopes
f5b421621d BreakIterator and RuleBasedBreakiterator added
This commit adds wrappers for the classes BreakIterator and
RuleBasedbreakIterator. The C++ ICU classes are described here:
<http://icu-project.org/apiref/icu4c/classBreakIterator.html>
<http://icu-project.org/apiref/icu4c/classRuleBasedBreakIterator.html>

Additionally, a tutorial is available at:
<http://userguide.icu-project.org/boundaryanalysis>

This implementation wraps UTF-8 text in a UText. The text is
iterated without any copying or conversion to UTF-16. There is
also no validation that the input is actually UTF-8; where there
are malformed sequences, the UText will simply U+FFFD.

The class BreakIterator cannot be instantiated directly (has a
private constructor). It provides the interface exposed by the ICU
abstract class with the same name. The PHP class is not abstract
because we may use it to wrap native subclasses of BreakIterator
that we don't know how to wrap. This class includes methods to
move the iterator position to the beginning (first()), to the
end (last()), forward (next()), backwards (previous()), to the
boundary preceding a certain position (preceding()) and following
a certain position (following()) and to obtain the current position
(current()). next() can also be used to advance or recede an
arbitrary number of positions.

BreakIterator also exposes other native methods:
getAvailableLocales(), getLocale() and factory methods to build
several predefined types of BreakIterators: createWordInstance()
for word boundaries, createCharacterInstance() for locale
dependent notions of "characters", createSentenceInstance() for
sentences, createLineInstance() and createTitleInstance() -- for
title casing breaks. These factories currently return
RuleBasedbreakIterators where the names of the rule sets are found
in the ICU data, observing the passed locale (although the locale
is taken into considering there are very few exceptions to the
root rules).

The clone and compare_object PHP object handlers are also
implemented, though the comparison does not yield meaningful results
when used with >, <, >= and <=.

Note that BreakIterator is an iterator only in the sense of the
first 'Iterator' in 'IteratorIterator', i.e., it does not
implement the Iterator interface. The reason is that there is
no sensible implementation for Iterator::key(). Using it for
an ordinal of the current boundary is not feasible because
we are allowed to move to any boundary at any time. It we were
to determine the current ordinal when last() is called we'd
have to traverse the whole input text to find out how many
breaks there were before. Therefore, BreakIterator implements
only Traversable. It can be wrapped in an IteratorIterator,
but the usual warnings apply.

Finally, I added a convenience method to BreakIterator:
getPartsIterator(). This provides an IntlIterator, backed
by the BreakIterator PHP object (i.e. moving the pointer or
changing the text in BreakIterator affects the iterator
and also moving the iterator affects the backing BreakIterator),
which allows traversing the text between each boundary.
This iterator uses the original text to retrieve the text
between two positions, not the code points returned by the
wrapping UText. Therefore, if the text includes invalid code
unit sequences, these invalid sequences will be in the output
of this iterator, not U+FFFD code points.

The class RuleBasedIterator exposes a constructor that allows
building an iterator from arbitrary compiled or non-compiled
rules. The form of these rules in described in the tutorial linked
above. The rest of the methods allow retrieving the rules --
getRules() and getCompiledRules() --, a hash code of the rule set
(hashCode()) and the rules statuses (getRuleStatus() and
getRuleStatusVec()).

Because the RuleBasedBreakIterator constructor may return parse
errors, I reuse the UParseError to text function that was in the
transliterator files. Therefore, I move that function to
intl_error.c.

common_enum.cpp was also changed, mainly to expose previously
static functions. This avoided code duplication when implementing
the BreakIterator iterator and the IntlIterator returned by
BreakIterator::getPartsIterator().
2012-06-04 22:25:07 +02:00
Gustavo André dos Santos Lopes
9b233b7e5e Changed XFAILed collator_get_sort_key.phpt
Ressurected and limited to ICU 4.8 in the hope that the sort keys
will remain stable in more recent ICU versions. I have only tested
with ICU 4.8 so far.
2012-06-04 10:18:24 +02:00
Gustavo André dos Santos Lopes
758f0686d4 Added and fixed tests given eb346ef 2012-06-04 00:02:35 +02:00
Gustavo André dos Santos Lopes
eb346ef0f4 DateFormat plays nice with Calendar, TimeZone
The following changes were made:

* The IntlDateFormatter constructor now accepts the usual values
  for its $timezone argument. This includes timezone identifiers,
  IntlTimeZone objects, DateTimeZone objects and NULL. An empty
  string is not accepted. An invalid time zone is no longer accepted
  (it used to use UTC in this case).
* When NULL is passed to IntlDateFormatter, the time zone specified in
  date.timezone is used instead of the ICU default.
* The IntlDateFormatter $calendar argument now accepts also an
  IntlCalendar. In this case, IntlDateFormatter::getCalendar() will
  return false.
* The time zone passed to the IntlDateFormatter is ignored if it is
  NULL and if the calendar passed is an IntlCalendar object -- in this
  case, the IntlCalendar time zone will be used instead. Otherwise,
  the time zone specified in the $timezone argument is used instead.
* Added IntlDateFormatter::getCalendarObject(), which always returns
  the IntlCalendar object that backs the DateFormat, even if a
  constant was passed to the constructor, i.e., if an IntlCalendar
  was not passed to the constructor.
* Added IntlDateFormatter::setTimeZone(). It accepts the usual values
  for time zone arguments. If NULL is passed, the time zone of the
  IntlDateFormatter WILL be overridden with the default time zone,
  even if an IntlCalendar object was passed to the constructor.
* Added IntlDateFormatter::getTimeZone(), which returns the time zone
  that's associated with the DateFormat.
* Depreacated IntlDateFormatter::setTimeZoneId() and made it an alias
  for IntlDateFormatter::setTimeZone(), as the new ::setTimeZone()
  also accepts plain identifiers, besides other types.
  IntlDateFormatter::getTimeZoneId() is not deprecated however.
* IntlDateFormatter::setCalendar() with a constant passed should now
  work correctly. This requires saving the requested locale to the
  constructor.
* Centralized the hacks required to avoid compilation disasters on
  Windows due to some headers being included inside and outside of
  extern "C" blocks.
2012-06-04 00:01:48 +02:00
Gustavo André dos Santos Lopes
72beff0d41 Added private constructor to IntlTimeZone. 2012-06-03 23:39:34 +02:00
Gustavo André dos Santos Lopes
f3802db7a0 Fixed write in constant memory.
clang did not forgive.
2012-06-03 23:39:27 +02:00
Stanislav Malyshev
ec2029a894 Merge branch 'PHP-5.4'
* PHP-5.4:
  fix test
  fix test
2012-05-29 23:53:01 -07:00
Stanislav Malyshev
9b98cf7865 fix test 2012-05-29 23:52:47 -07:00
Gustavo André dos Santos Lopes
a1e97bada8 Fixed problem in IntlCalendar debug handler
*is_temp was not being set.

Also deleted a redundant assignment to *is_temp in IntlTimeZone.
2012-05-25 13:29:19 +02:00
Gustavo André dos Santos Lopes
457a57d653 Merge branch '5.4' 2012-05-24 14:33:42 +02:00
Gustavo André dos Santos Lopes
04fd0b1098 Merge branch '5.3' into 5.4 2012-05-24 14:33:24 +02:00
Gustavo André dos Santos Lopes
85c777d2f1 Fixed bug #55610: ResourceBundle and Traversable 2012-05-24 14:33:05 +02:00
Gustavo André dos Santos Lopes
888e77ff73 Fixed last commit on 5.4
There's no change from the intended behavior. If INTL_G(default_locale)
is NULL, the default ICU locale, as given by locale_get_default() in
master, will still be used by ures_open().
2012-05-24 14:17:52 +02:00
Gustavo André dos Santos Lopes
a03f2e3814 Merge branch '5.4'
Conflicts:
	UPGRADING
2012-05-24 13:52:06 +02:00
Gustavo André dos Santos Lopes
92039fed22 Changed ResourceBundle constructor behavior
null is now accepted for two first (mandatory arguments).

Passing null as the package name causes NULL to be passed to ICU  and
the default ICU data to be loaded.

Passing null as the locale name causes the default locale to be used.
2012-05-24 13:50:59 +02:00
Gustavo André dos Santos Lopes
d4fd95e292 Merge branch '5.4' 2012-05-24 11:09:18 +02:00
Gustavo André dos Santos Lopes
e8009e2dca Merge branch '5.3' into 5.4 2012-05-24 11:08:55 +02:00
Gustavo André dos Santos Lopes
2da2de46a8 Fixed bug #60785
Memory leak in IntlDateFormatter constructor.

udat_setCalendar() clones the calendar before it adopts it,
so we were leaking the original calendar.

Also we now validate the calendar type.
2012-05-24 11:06:21 +02:00
Gustavo André dos Santos Lopes
ca515e8073 Merge branch '5.4' 2012-05-23 15:52:47 +02:00
Gustavo André dos Santos Lopes
0838a2b7c5 Merge branch '5.3' into 5.4 2012-05-23 15:52:32 +02:00
Gustavo André dos Santos Lopes
e08566c613 Fixed bug #62017
IntlDateFormatter constructor would release some resources
under certain error conditions.
2012-05-23 15:52:19 +02:00
Gustavo André dos Santos Lopes
70e3e627fe Fixed several ext/intl tests 2012-05-23 14:49:01 +02:00
Gustavo André dos Santos Lopes
2eb069aa48 Merge branch '5.4' 2012-05-23 13:27:54 +02:00
Gustavo André dos Santos Lopes
8ee8ccda19 Merge branch '5.3' into 5.4
Conflicts:
	sapi/fpm/fpm/fpm_main.c
2012-05-23 13:27:21 +02:00
Gustavo André dos Santos Lopes
1eff3b01b8 Fixed bug #6208: memory leak in grapheme_extract() 2012-05-23 13:25:45 +02:00
Gustavo André dos Santos Lopes
86ea921291 Fixed bug #62082
This was a buffer overflow in internal function
get_icu_disp_value_src_php().
2012-05-23 13:25:42 +02:00
Gustavo André dos Santos Lopes
07c0d714a5 Fixed bug #62081
Constructor of IntlDateFormatter would leak if called twice.

Made calling it more than once error out before starting
using resources.
2012-05-23 13:25:37 +02:00
Gustavo André dos Santos Lopes
51286bd8e5 Fixed bug #62070
Collator::getSortKey() was returning an unterminated string
due the length given to RETURN_STRINGL being off by one.
2012-05-23 13:25:32 +02:00
Felipe Pena
82740ef31e - Fixed build using g++ (which complains about jump that crosses initialization) 2012-05-20 16:17:17 -03:00
Gustavo André dos Santos Lopes
3a81f90ebc Added IntlCalendar::toDateTime() 2012-05-17 23:18:51 +02:00
Gustavo André dos Santos Lopes
49b1f58194 Fixed a couple of memory leaks 2012-05-17 23:17:00 +02:00
Gustavo André dos Santos Lopes
887744f6b4 Fixed bad DateTime construction state check 2012-05-17 18:16:54 +02:00
Gustavo André dos Santos Lopes
ec23c3e540 MessageFormatter accepts IntlCalendar arguments
Now MessageFormatter::format() accepts IntlCalendar objects to be used in
arguments of type Format::kDate.
2012-05-17 17:57:37 +02:00
Gustavo André dos Santos Lopes
e9351b89a9 Bug #58756: w.r.t MessageFormatter (partial fix)
I don't think the current ICU API allows this bug to be completely fixed.

Right now, the code cannot control the time zone used in date/time formats
that appear inside complex subformats. See the comment inside
umsg_set_timezone().
2012-05-17 17:57:01 +02:00
Gustavo André dos Santos Lopes
30bf2fbb9d Handle bogus string in intl_charFromString(). 2012-05-17 17:23:53 +02:00
Gustavo André dos Santos Lopes
81d8f4079c Whitespace. 2012-05-17 17:23:52 +02:00
Gustavo André dos Santos Lopes
4cfd9995da Added IntlTimeZone::fromDateTimeZone() and ::toDateTimeZone.
IntlTimeZone::fromDateTimeZone(DateTimeZone $dtz) converts from an
ext/date TimeZone to an IntlTimeZone. The conversion is done by feeding
the time zone name (essentially what would be given by
DateTimeZone::getName()) to ICU's TimeZone::createTimeZone except if it's
an offset time zone. In that case, the offset is read from the ext/date
time zone object structure and an appopriate id (of the form
GMT<+|-><HH:MM>) is given to ICU's TimeZone::createTimeZone. Not all
ext/date time zones are recognized for ICU. For instance, WEST is not.
Note that these kind of abbreviations, as far as I can tell, can only be
created via ext/date DateTime, not directly through DateTimeZone's
constructor.

For IntlTimeZone::toDateTimeZone(), the behavior is symmetrical.
We instantiate a DateTimeZone and then call its constructor if we don't
have an offset time zone, otherwise we mess with its structure. If the
timezone is not valid for ext/date, then we allow the exception of
DateTimeZone constructor to propagate.
2012-05-17 17:23:51 +02:00
Gustavo André dos Santos Lopes
22f4a30748 Fixed two IntlCalendar::setTimeZone() tests. 2012-05-17 17:23:50 +02:00
Gustavo André dos Santos Lopes
81278e1bbb Added IntlCalendar::fromDateTime()
IntlCalendar::fromDateTime(DateTime|string $dateTime[, string $locale)
intlcal_from_date_time(...)

If a string is given as the first argument, the method will try to
instantiate a new DateTime object and use that instead.
2012-05-17 17:23:47 +02:00
Gustavo André dos Santos Lopes
9a35d45a5b Accept DateTimeZone where time zones are expected.
Also unified timezone handling in IntlCalendar::setTimeZone()
to that in the IntlCalendar and IntlGregorianCalendar constructors.
2012-05-17 17:23:46 +02:00
Gustavo André dos Santos Lopes
ac33e40d2a Keep date precision in MessageFormatter.
MessageFormatter::parse and MessageFormat::format (and their static
equivalents) now don't throw away better than second precision in the
arguments.

It's already bad enough that in MessageFormatter and IntlDateFormatter we
use seconds since epoch instead of milliseconds since epoch, deviating
from the ICU date representations. But we don't need to throw away extra
precision when parsing dates; we can keep the seconds since epoch
convention and return non integer doubles with only a small BC impact.
Note that we already could return doubles from MessageFormatter::parse if
the date was sufficiently in the past or in the future.
2012-05-13 23:03:07 +02:00
Gustavo André dos Santos Lopes
53860672f3 ICU < 4.8 compat in MessageFormatter
Restricted support for named arguments to ICU 4.8+.

Also added bound checks when converting arguments to Formattables.
2012-05-13 20:55:02 +01:00
Gustavo André dos Santos Lopes
43ff66e095 Don't check number of args in msgfmt_do_format
The check does not work reliably across ICU versions when named arguments
are added to the mix. For instance, for recent versions of ICU like 49,
a pattern like "{foo,number} {foo}", has 0 returned from
umsg_format_arg_count(), but for ICU 4.0, this returns 2.
2012-05-13 20:54:55 +01:00
Gustavo André dos Santos Lopes
0295ed7d22 Added new MessageFormatter tests. 2012-05-13 20:53:06 +01:00
Gustavo André dos Santos Lopes
1c4f99b988 Better error messages in MessageFormatter::format. 2012-05-13 20:53:06 +01:00
Gustavo André dos Santos Lopes
0ad1b14f16 Accept numeric strings for dates.
Refactored umsg_helper_zval_to_millis in the process.
2012-05-13 20:53:06 +01:00
Gustavo André dos Santos Lopes
20dd5ccf19 Cache arguments type info in MessageFormatter. 2012-05-13 20:53:05 +01:00
Gustavo André dos Santos Lopes
407455876e Set global error if insufficient numeric args. WS. 2012-05-13 20:53:05 +01:00
Gustavo André dos Santos Lopes
f1621485ad Fixed MessageFormatter subformat tests. 2012-05-13 20:53:05 +01:00
Gustavo André dos Santos Lopes
edca0e2adb Refactoring of patch for FR #61871. 2012-05-13 20:52:41 +01:00
Gustavo André dos Santos Lopes
c9b913b56b Orig patch for FR #61871 by David Sklar 2012-05-13 20:51:43 +01:00
Felipe Pena
93d42fb444 Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor twice)
2012-04-23 15:19:35 -03:00
Felipe Pena
883d40667d Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor twice)
2012-04-23 15:19:23 -03:00
Felipe Pena
c8865e3b84 - Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor twice) 2012-04-23 15:18:12 -03:00
Stanislav Malyshev
71884b7024 Merge branch 'PHP-5.4'
* PHP-5.4:
  Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
2012-04-19 11:37:55 -07:00
Stanislav Malyshev
106e0a2e68 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
2012-04-19 11:37:31 -07:00
Stanislav Malyshev
5cbf2d6785 Merge branch 'pull-request/61' into PHP-5.3
* pull-request/61:
  Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
2012-04-19 11:28:30 -07:00
Sherif Ramadan
2827324c7c Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer 2012-04-19 04:44:43 -04:00
Gustavo André dos Santos Lopes
d32ac3efc8 Fixed tests that required a "default" timezone.
Added date.timezone=Atlantic/Azores to all tests that were failing because
of ext/date warning about a timezone not having been set.
2012-04-01 23:28:01 +01:00
Gustavo André dos Santos Lopes
95fbae891a Compatibility with old versions of ICU (4.0+). 2012-04-01 23:28:01 +01:00
Gustavo André dos Santos Lopes
69f75bb43c Added support for new method TimeZone::getUnknown() added in ICU 49. 2012-04-01 23:28:00 +01:00
Gustavo André dos Santos Lopes
d3a29c108b Supported Calendar methods new to ICU 49. 2012-04-01 23:28:00 +01:00
Gustavo André dos Santos Lopes
7460741f99 Fix TimeZone tests failing due to new data in ICU 49. 2012-04-01 23:28:00 +01:00
Gustavo André dos Santos Lopes
5e65205a8f Initial checkin of calendar/timezone code. 2012-04-01 23:28:00 +01:00
Gustavo André dos Santos Lopes
ab627e0eb0 Convert EOL style to Unix. 2012-04-01 11:00:05 +02:00
Anatoliy Belsky
bd928f0592 Fix bug #61448 intl tests fail with icu >= 4.8 2012-03-28 15:07:01 +02:00
Anatoliy Belsky
a715a21594 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug #61448 intl tests fail with icu >= 4.8
2012-03-28 14:53:28 +02:00
Anatoliy Belsky
105a9a9d45 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61448 intl tests fail with icu >= 4.8
2012-03-28 14:01:14 +02:00
Anatoliy Belsky
103995ba22 Fix bug #61448 intl tests fail with icu >= 4.8 2012-03-28 13:59:51 +02:00
Stanislav Malyshev
d780b4e4b3 Merge branch 'PHP-5.4'
* PHP-5.4:
  fix tests
2012-03-25 13:50:33 -07:00
Stanislav Malyshev
d51c1e0a4c fix tests 2012-03-25 13:49:19 -07:00
Stanislav Malyshev
53c2f47a8f Merge branch 'PHP-5.4'
* PHP-5.4:
  fix bug #61487 - bad bounds check in grapheme_strpos
2012-03-25 01:03:43 -07:00
Stanislav Malyshev
2bd5fa0eda Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix bug #61487 - bad bounds check in grapheme_strpos
2012-03-25 01:03:25 -07:00
Stanislav Malyshev
cd9cd36d7e fix bug #61487 - bad bounds check in grapheme_strpos 2012-03-25 00:56:38 -07:00
Rasmus Lerdorf
d00be8ce0b Same thing here. "June 18, 1969 8:49:59 AM " does not contain a timezone, so there
is no way to know whether dst should be applied or not.
2012-02-05 10:35:56 +00:00
Rasmus Lerdorf
2500b7e5ba Same thing here. "June 18, 1969 8:49:59 AM " does not contain a timezone, so there
is no way to know whether dst should be applied or not.
2012-02-05 10:35:56 +00:00
Rasmus Lerdorf
6659010dc9 Same thing here. "June 18, 1969 8:49:59 AM " does not contain a timezone, so there
is no way to know whether dst should be applied or not.
2012-02-05 10:35:56 +00:00
Rasmus Lerdorf
67fe1e2619 Without a timezone you can't know whether it is dst or not in this one 2012-02-05 10:29:34 +00:00
Rasmus Lerdorf
fe777cd4db Without a timezone you can't know whether it is dst or not in this one 2012-02-05 10:29:34 +00:00
Rasmus Lerdorf
c5ec2f77dd Without a timezone you can't know whether it is dst or not in this one 2012-02-05 10:29:34 +00:00
Gustavo André dos Santos Lopes
10324891f8 - Added the ability for the intl exception to throw exceptions when a global error is set. 2012-01-08 18:41:53 +00:00
Gustavo André dos Santos Lopes
9985d99358 - Fixed bug #60392 (U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR undeclared)
(fedora at famillecollet dot com)
2011-11-26 14:55:31 +00:00
Gustavo André dos Santos Lopes
7c2946f80e - Fixed bug #60392 (U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR undeclared)
(fedora at famillecollet dot com)
2011-11-26 14:55:31 +00:00
Gustavo André dos Santos Lopes
d06c4e90a7 - Updated UPGRADING, protos and attribution in ext/intl/idn/idn.c 2011-11-24 22:45:50 +00:00
Gustavo André dos Santos Lopes
5b383dacdf - Updated UPGRADING, protos and attribution in ext/intl/idn/idn.c 2011-11-24 22:45:50 +00:00
Gustavo André dos Santos Lopes
5fa1cfbbe6 - Support for UTS #46. 2011-11-24 17:54:50 +00:00
Gustavo André dos Santos Lopes
fa4fe63944 - Support for UTS #46. 2011-11-24 17:54:50 +00:00
Felipe Pena
735dc01811 - Fixed memory leak in several Intl locale functions 2011-11-22 12:29:15 +00:00
Felipe Pena
f6fb9fc2b2 - Fixed memory leak in several Intl locale functions 2011-11-22 12:29:15 +00:00
Felipe Pena
cc8c3a2d00 - Fixed memory leak in several Intl locale functions 2011-11-22 12:29:15 +00:00
Florian Anderiasch
6587e243ec Redid the fix for #60192 with suggestions by Pierre and Kalle 2011-11-03 16:20:11 +00:00
Florian Anderiasch
8343d05e85 Redid the fix for #60192 with suggestions by Pierre and Kalle 2011-11-03 16:20:11 +00:00
Florian Anderiasch
635e2c28fe Redid the fix for #60192 with suggestions by Pierre and Kalle 2011-11-03 16:20:11 +00:00
Florian Anderiasch
fe5f6f9188 Fix #60192 SegFault when Collator not constructed properly 2011-11-02 07:36:52 +00:00
Florian Anderiasch
294c28f885 Fix #60192 SegFault when Collator not constructed properly 2011-11-02 07:36:52 +00:00
Florian Anderiasch
c2874a8077 Fix #60192 SegFault when Collator not constructed properly 2011-11-02 07:36:52 +00:00
Stanislav Malyshev
d81ea16ef1 Changed silent conversion of array to string to produce a notice. (Patrick) 2011-10-21 06:08:47 +00:00
Stanislav Malyshev
ed12ebc79c Changed silent conversion of array to string to produce a notice. (Patrick) 2011-10-21 06:08:47 +00:00
Ferenc Kovacs
ce68c06ece the TZ environment variable also needed to be set here, didn't dug up why date.timezone isn't sufficient 2011-09-22 22:29:28 +00:00
Ferenc Kovacs
54e570123c the TZ environment variable also needed to be set here, didn't dug up why date.timezone isn't sufficient 2011-09-22 22:29:28 +00:00
Ferenc Kovacs
a52d3efe08 the TZ environment variable also needed to be set here, didn't dug up why date.timezone isn't sufficient 2011-09-22 22:29:28 +00:00
Xinchen Hui
30718d0f14 Added skipif 2011-09-06 09:17:12 +00:00
Xinchen Hui
b1eaad7d1f Added skipif 2011-09-06 09:17:12 +00:00
Xinchen Hui
3901f5abb8 Added skipif 2011-09-06 09:17:12 +00:00
Stanislav Malyshev
cc9483f19e fix tests 2011-09-05 00:49:03 +00:00
Stanislav Malyshev
6e8ebecf0e fix tests 2011-09-05 00:49:03 +00:00
Stanislav Malyshev
e07d1f0bbc fix tests 2011-09-05 00:49:03 +00:00
Stanislav Malyshev
40217d0417 fix bug 55562 - make substr always return rest of the string if length is too long 2011-09-04 18:50:05 +00:00
Stanislav Malyshev
ae1af27e18 fix bug 55562 - make substr always return rest of the string if length is too long 2011-09-04 18:50:05 +00:00
Pierre Joye
e0792c2590 - wrong variable used (ended as non initiazed usage) 2011-09-04 16:33:51 +00:00
Pierre Joye
a948142d31 - wrong variable used (ended as non initiazed usage) 2011-09-04 16:33:31 +00:00
Pierre Joye
678e8e2872 - wrong variable used (ended as non initiazed usage) 2011-09-04 16:33:31 +00:00
Gwynne Raskind
f4f7a32121 Front- and back-port rev 314431 (missing php.h include) 2011-08-07 17:15:40 +00:00
Gwynne Raskind
dfe8fbca9e Front- and back-port rev 314431 (missing php.h include) 2011-08-07 17:15:40 +00:00
Gwynne Raskind
159635f4f5 Back- and front-port fixes for #55019 2011-08-07 17:14:14 +00:00
Gwynne Raskind
b8a2da31b1 Back- and front-port fixes for #55019 2011-08-07 17:14:14 +00:00
Gwynne Raskind
e8281417fd Fixes build issues with ext/intl. This appears to be related to bug #55019, but since the functions in question are used elsewhere, the solution is to de-inline rather than to make them static inline. 2011-08-07 15:12:34 +00:00
Gwynne Raskind
a1d6eaf6d6 fix for bug #55019 2011-08-07 15:09:42 +00:00
Gwynne Raskind
1607c8901d Add missing php.h include 2011-08-07 15:07:53 +00:00