You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c051104
Browse filesBrowse the repository at this point in the historyBrowse files
ext/intl: Use byte offsets in IntlDateFormatter parsing
IntlDateFormatter::parse(), localtime() and parseToCalendar() passed the
PHP byte offset to ICU, which expects a UTF-16 code-unit position, and
returned ICU's position unchanged. With multibyte text before the date,
parsing started at the wrong place and the returned offset was too
small. Convert the offset in both directions as GH-23094 did for
NumberFormatter, and reject an offset that splits a UTF-8 sequence. A
returned position inside a surrogate pair, which a partially matched
literal can produce, maps to the start of that character. The offset
helpers move into intl_convert.c and NumberFormatter now uses them too.
0 commit comments