[wp-trac] [WordPress Trac] #28472: WordPress should use setlocale() to ensure consistent string, dates, times and numbers handling

WordPress Trac noreply at wordpress.org
Sun Jun 15 11:07:10 UTC 2014


#28472: WordPress should use setlocale() to ensure consistent string, dates, times
and numbers handling
--------------------------------+------------------------------
 Reporter:  howardtw            |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  I18N                |     Version:  3.9.1
 Severity:  normal              |  Resolution:
 Keywords:  close dev-feedback  |     Focuses:
--------------------------------+------------------------------
Changes (by Denis-de-Bernardy):

 * keywords:   => close dev-feedback


Comment:

 It's not used for good reasons. Per the PHP docs:

 > Warning
 > The locale information is maintained per process, not per thread. If you
 are running PHP on a multithreaded server API like IIS or Apache on
 Windows, you may experience sudden changes in locale settings while a
 script is running, though the script itself never called setlocale(). This
 happens due to other scripts running in different threads of the same
 process at the same time, changing the process-wide locale using
 setlocale().

 http://us2.php.net//manual/en/function.setlocale.php

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28472#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list