Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 24889 invoked from network); 3 Oct 2007 18:24:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Oct 2007 18:24:42 -0000 Received: (qmail 4010 invoked by uid 500); 3 Oct 2007 18:24:31 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 4000 invoked by uid 500); 3 Oct 2007 18:24:31 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 3989 invoked by uid 99); 3 Oct 2007 18:24:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2007 11:24:31 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Farid_Zaripov@epam.com designates 217.21.63.3 as permitted sender) Received: from [217.21.63.3] (HELO EPMSA009.epam.com) (217.21.63.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2007 18:24:32 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: 22.locale.moneypunct test fails on MSVC Date: Wed, 3 Oct 2007 21:23:43 +0300 Message-ID: <7BDB2168BEAEF14C98F1901FD2DE6438010B2253@epmsa009.minsk.epam.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: 22.locale.moneypunct test fails on MSVC Thread-Index: AcgF6oeSXbXUNHt5SRKwKCRP5uykMA== From: "Farid Zaripov" To: X-Virus-Checked: Checked by ClamAV on apache.org The 22.locale.moneypunct test fails on MSVC (and ICC/Windows) due to bug of the CRT or native API. The following program aborts on assert (tested on all MSVC's on Windows XP 32 and 64 bit). This program fails only for some locales. So it fails with locname =3D "Catalan_Spain.1252" but succeeds with locname =3D "Russian_Russia.1251". ----------------------- #include #include #include #include int main(int argc, char* argv[]) { const char* locname =3D "Catalan_Spain.1252"; std::setlocale (LC_ALL, "C"); std::setlocale (LC_MONETARY, locname); const lconv* pconv =3D std::localeconv (); char curr =3D pconv->currency_symbol [0]; std::setlocale (LC_ALL, "C"); std::setlocale (LC_ALL, locname); pconv =3D std::localeconv (); char curr2 =3D pconv->currency_symbol [0]; std::printf ("curr =3D %d\n", int (curr)); std::printf ("curr2 =3D %d\n", int (curr2)); assert (curr =3D=3D curr2); return 0; } =20 ----------------------- The program output: ----------------------- curr =3D -120 curr2 =3D -128 Assertion failed: curr =3D=3D curr2, file d:\_projects\locbug\locbug\locbug.cpp, line 29 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. ----------------------- Farid.