From stdcxx-dev-return-3320-apmail-incubator-stdcxx-dev-archive=incubator.apache.org@incubator.apache.org Sat May 12 21:42:45 2007 Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 79466 invoked from network); 12 May 2007 21:42:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 May 2007 21:42:44 -0000 Received: (qmail 88860 invoked by uid 500); 12 May 2007 21:42:50 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 88845 invoked by uid 500); 12 May 2007 21:42:50 -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 88834 invoked by uid 99); 12 May 2007 21:42:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 May 2007 14:42:50 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of msebor@gmail.com designates 64.233.166.177 as permitted sender) Received: from [64.233.166.177] (HELO py-out-1112.google.com) (64.233.166.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 May 2007 14:42:42 -0700 Received: by py-out-1112.google.com with SMTP id p76so1376266pyb for ; Sat, 12 May 2007 14:42:20 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=FSUsVN40nbuao0Yck+FTqr87jexwIPmWxHR25W/oko+xVRXwdq0kj/xsiayRSWGzZpWAvEMB9fZ1tnzul1T40BWDr6v2btsvZ9wyFH45RyyA07M7fZ/2bC0B3u/0QPq3iYLVEFW7bbquqhZbOQb2+Pol9FwQwyBB7WUhEpIli4Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=gQOlRliSvien0ilN1SXjAfYmCSdhFU9p1dYKMXAVHzBechSuSjdNd3gGRnhBvT20ALhCpX5iYVlXWbJktVK8Gy497aUB/iTcI7UDUPMaNBMtIKnAUEZrCKfGDhn8NFCwpxZDVqSa7imR0iMRbnJuElUn+ygjbVky2AoRSK4z6FY= Received: by 10.35.43.10 with SMTP id v10mr7689676pyj.1179006140717; Sat, 12 May 2007 14:42:20 -0700 (PDT) Received: from ?192.168.1.104? ( [71.229.200.170]) by mx.google.com with ESMTP id 23sm11224259nzn.2007.05.12.14.42.17; Sat, 12 May 2007 14:42:18 -0700 (PDT) Message-ID: <464634B8.1070905@roguewave.com> Date: Sat, 12 May 2007 15:42:16 -0600 From: Martin Sebor Organization: Rogue Wave Software User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.10) Gecko/20070301 Fedora/1.0.8-0.6.2.fc6 pango-text SeaMonkey/1.0.8 MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: svn commit: r537492 - /incubator/stdcxx/trunk/doc/stdlibref/money-get.html References: <29cb0b14776.0000019bmbrown@inbox.com> <2B05B45F886.00000263mbrown@inbox.com> In-Reply-To: <2B05B45F886.00000263mbrown@inbox.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Martin Sebor X-Virus-Checked: Checked by ClamAV on apache.org Mark Brown wrote: >> -----Original Message----- >> From: sebor@roguewave.com >> Sent: Sat, 12 May 2007 14:09:34 -0600 >> To: stdcxx-dev@incubator.apache.org >> Subject: Re: svn commit: r537492 - >> /incubator/stdcxx/trunk/doc/stdlibref/money-get.html >> >> Mark Brown wrote: >>> Martin, >>> >>> Thanks for fixing it! I have a question about the new code: Could you >>> show an example of an international monetary string that would be >>> correctly parsed by the facet? I tried a few but none of them could be >>> parsed. For instance, "USD 1234" gives this output: >>> USD 1234 --> "" --> 0 >>> The same happens with g++ and STLport so I suspect I must be doing >>> something wrong. Removing the space between the currency symbol and the >>> number didn't make a difference. >> Hmm, I guess I should have tested the internationalized behavior before >> I put it in. I think the code is correct as is and your input should be >> correctly parsed by the facet (and produce 1234 on output). I'm not sure >> what's going on. Stepping through the code it looks like the money_get >> facet ends up retrieving the wrong specialization of moneypunct, i.e., >> moneypunct when it needs moneypunct. What's >> puzzling is that both libstdc++ and STLport behave the same. It seems >> like too much of a coincidence for all three implementations to suffer >> from the same bug. >> >> In any event, thanks for bringing it to our attention! Can you open an >> issue for this as well so we don't forget to investigate it in case I >> don't get around to it soon? > > I can certainly do that. I should also mention that while investigating this problem I found a test that's supposed to test this functionality: 22.locale.money.get.cpp. The test fails 20 out of 1934 assertions but none of them look like they have anything to do with parsing international monetary values. It doesn't look like they are being tested at all... Yeah, I noticed it too. I'm in the process of enhancing the test to exercise the international formats as well. If you don't mind creating another issue for the test, just for tracking purposes, that would be swell! Martin