xref: /PHP-8.4/ext/intl/tests/bug69374.phpt (revision 74859783)
1--TEST--
2IntlDateFormatter::formatObject(): returns wrong utf8 value when $format param is utf8 string pattern.
3--EXTENSIONS--
4intl
5--SKIPIF--
6<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU >= 51.1.2'); ?>
7--FILE--
8<?php
9$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015
10$pattern1 = '\'tháng\' MM, y'; // yMM format for Vietnamese
11$pattern2 = 'y년 MMM'; // yMM format for Korean
12$date = IntlCalendar::createInstance('Asia/Ho_Chi_Minh');
13$date->setTime($millitimestamp);
14echo IntlDateFormatter::formatObject($date, $pattern1, 'vi_VN'), "\n";
15echo IntlDateFormatter::formatObject ($date, $pattern2, 'ko_KR'), "\n";
16?>
17--EXPECT--
18tháng 04, 2015
192015년 4월
20