Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 37625 invoked from network); 27 Mar 2008 19:43:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Mar 2008 19:43:32 -0000 Received: (qmail 99928 invoked by uid 500); 27 Mar 2008 19:43:30 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 99901 invoked by uid 500); 27 Mar 2008 19:43:30 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 99755 invoked by uid 99); 27 Mar 2008 19:43:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Mar 2008 12:43:30 -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: local policy) Received: from [208.30.140.160] (HELO moroha.roguewave.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Mar 2008 19:42:48 +0000 Received: from exchmail01.Blue.Roguewave.Com (exchmail01.blue.roguewave.com [10.22.129.22]) by moroha.roguewave.com (8.13.6/8.13.6) with ESMTP id m2RJgwMm024503 for ; Thu, 27 Mar 2008 19:42:58 GMT X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C89042.D0585937" Subject: RE: [Stdcxx Wiki] Update of "LocaleLookup" by TravisVitek Date: Thu, 27 Mar 2008 13:42:30 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Stdcxx Wiki] Update of "LocaleLookup" by TravisVitek Thread-Index: AciQGnanm0UoNo5WTgOfqN+Pkiq+KQAKDs/8 References: <20080326220304.410.29885@eos.apache.org> <47EBB480.100@roguewave.com> From: "Travis Vitek" To: X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C89042.D0585937 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > >Look at you: you've become a regular wiki formatting artist! ;-) > Yup. I'm getting used to clicking through the Wiki formatting guide. >> + || Test || Criteria || > >Great breakdown. I assume the Criteria are the current conditions. >We should also try to come up with the ideal conditions that we'll >want to implement using the new API. Yeah, that is the hard part. >> + || 22.LOCALE.CODECVT.MT.CPP || *1,+ || > >Any particular reason these names are all caps? :) > That is just the format of the output that I got when gathering the = names of all tests that use `rw_locales()' >> + || 22.LOCALE.CODECVT.OUT.CPP || *2 || > >IIRC, this test tries to exercise all values of MB_CUR_MAX, not >just the largest. > Nope. It calls a function named `find_mb_locale()' which looks through = the list of installed locales for the one that has the largest return from = the function `get_mb_chars()'. The comment from `find_mb_locale()' says... finds the multibyte locale with the largest MB_CUR_MAX value and fills consecutive elemenets of the `mb_chars' array with multibyte characters between 1 and MB_CUR_MAX bytes long for such a locale >> + || 22.LOCALE.CONS.MT.CPP || *1,+ || >> + || 22.LOCALE.CTYPE.CPP || *2 || >> + || 22.LOCALE.CTYPE.IS.CPP || *2 || >> + || 22.LOCALE.CTYPE.MT.CPP || *1,+ || >> + || 22.LOCALE.CTYPE.NARROW.CPP || *2 || >> + || 22.LOCALE.CTYPE.SCAN.CPP || *2 || >> + || 22.LOCALE.CTYPE.TOLOWER.CPP || *2 || >> + || 22.LOCALE.CTYPE.TOUPPER.CPP || *2 || > >I thought the ctype tests were being run in all installed locales, >just like the numpunct one? Which is what we want to move away from. >IMO, exercising a small set (less than a dozen) of known locales and >encodings should be plenty. > Yes, the non-mt ctype tests iterate over each locale for which the = function call `setlocale (LC_CTYPE, name)' succeeds. The mt ctype tests all limit the number of tested locales to 32. >> + || 22.LOCALE.TIME.GET.CPP || *5,6 || > >I think in the time tests we look for a locale using a specific >language (e.g., Danish, English, German). The encoding doesn't >really matter, unless we throw in some Asian language as well. >Grepping for the locale using a regular expression was the best >we could do using the old interface. I suppose we'll still be >using a regular expression with the new API, unless you have >support for just language names (e.g., "da, de, en"). > Yes. Using the grammar from the Wiki page, you can get the name of a = single Danish language locale for any country, codeset or MB_CUR_LEN value = using the following call... const char* name =3D rw_locale_query (LC_TIME, "da-*-*-*", 1); If, as an enhancement, we wanted to allow the user to provide just the language name, or language and country, we could probably do that. Travis ------_=_NextPart_001_01C89042.D0585937--