Bug #60424 [Com]: String with apostrophe are incorrect with MessageFormatter
| From: | sam at rmcreative dot ru | Date: | Sun, 13 Sep 2015 21:26:52 +0000 |
| Subject: | Bug #60424 [Com]: String with apostrophe are incorrect with MessageFormatter | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-195986@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60424&edit=1
ID: 60424
Comment by: sam at rmcreative dot ru
Reported by: gcharneau at gmail dot com
Summary: String with apostrophe are incorrect with
MessageFormatter
Status: Open
Type: Bug
Package: I18N and L10N related
Operating System: Mac OS X 10.6, Windows 7
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
Apostrophes are used as escaping character. If you need it in the final string, use ''.
Previous Comments:
------------------------------------------------------------------------
[2011-12-01 13:37:45] gcharneau at gmail dot com
Description:
------------
The formatting of strings containing apostrophes is wrong.
Test script:
---------------
$locale = 'fr_FR';
$args = array(1);
$string = "{0, choice, 0<{0} d'eé|1<{0} d'aà }";
echo msgfmt_format_message($locale, $string, $args);
$string = "{0, choice, 0<{0} d''eé|1<{0} d''aà }";
echo msgfmt_format_message($locale, $string, $args);
Expected result:
----------------
1 d'eé
1 d'eé
Actual result:
--------------
1 deé|1<1 daÃ
1 deé
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60424&edit=1