Fix #69374 IntlDateFormatter::formatObject returns wrong utf8 value#1219
Fix #69374 IntlDateFormatter::formatObject returns wrong utf8 value#1219micti wants to merge 4 commits intophp:masterfrom
Conversation
|
Could you please add a test? |
|
Just added test for 2 bugs #69374 & #69398 |
|
The ext/intl/tests/bug69374.phpt fails for me. Why they are to skip for ICU < 50? Thanks. |
|
@weltling About ICU version, the test result is based on Unicode CLDR (ICU) version. At the time I found these bugs, I used ICU version > 50, so I skipped older version, I'm not sure about older version result. Thanks. |
|
@micti fine then. I was checking with 57.1 where it fails. It could be good that the data was changed (happens frequently with ICU updates). But anyway, the correct skipif part would look like From the test, this is what i get with your patch When i switch to UnicodeString::fromUTF8, but that's most likely due to the data changes in ICU. What concerns me is, that we currently don't enforce UTF-8 with ICU (though it is a default encoding). So using fromUTF8 only is probably not a solution. And the first variant doesn't seem to work. Maybe a solution could be to use fromUTF-8 first, and then fall back to the old variant on failure. But there are probably other draw backs we don't know about. Thanks. |
We can use simple ICU UnicodeString constructor or UnicodeString::fromUTF8