#44506 [Opn->Bgs]: nl_langinfo()

From: Date: Tue, 25 Mar 2008 11:28:12 +0000
Subject: #44506 [Opn->Bgs]: nl_langinfo()
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-630@lists.php.net to get a copy of this message
ID: 44506 Updated by: felipe@php.net Reported By: jo at feuersee dot de -Status: Open +Status: Bogus -Bug Type: I18N and L10N related +Bug Type: Documentation problem Operating System: Linux PHP Version: 5.2.5 New Comment: The documentation says "constant name of the element", isn't "string of constant name ...". Thanks. Previous Comments: ------------------------------------------------------------------------ [2008-03-22 21:38:52] jo at feuersee dot de Description: ------------ The documentation states that "item may be an integer value of the element or the constant name of the element." The 2nd way (passing the const name as a string) doesn't work, the returned string will always be empty (""). This may be a documentation bug. Reproduce code: --------------- jo@l33t ~> php5 -r '$l = setlocale(LC_ALL, "de_DE.utf8"); printf("%s: %s\n", $l, nl_langinfo(D_T_FMT));' de_DE.utf8: %a %d %b %Y %T %Z jo@l33t ~> php5 -r '$l = setlocale(LC_ALL, "de_DE.utf8"); printf("%s: %s\n", $l, nl_langinfo("D_T_FMT"));' de_DE.utf8: Expected result: ---------------- Both ways return de_DE.utf8: %a %d %b %Y %T %Z Actual result: -------------- Only when using the D_T_FMT const, the result is like expected. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44506&edit=1

« previous php.doc.bugs (#630) next »