Return-Path: Delivered-To: apmail-stdcxx-issues-archive@locus.apache.org Received: (qmail 82020 invoked from network); 12 Apr 2008 22:33:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Apr 2008 22:33:08 -0000 Received: (qmail 73221 invoked by uid 500); 12 Apr 2008 22:33:09 -0000 Delivered-To: apmail-stdcxx-issues-archive@stdcxx.apache.org Received: (qmail 73195 invoked by uid 500); 12 Apr 2008 22:33:09 -0000 Mailing-List: contact issues-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 issues@stdcxx.apache.org Received: (qmail 73186 invoked by uid 99); 12 Apr 2008 22:33:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2008 15:33:09 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2008 22:32:26 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BAC4A234C0BC for ; Sat, 12 Apr 2008 15:30:04 -0700 (PDT) Message-ID: <255294481.1208039404757.JavaMail.jira@brutus> Date: Sat, 12 Apr 2008 15:30:04 -0700 (PDT) From: "Martin Sebor (JIRA)" To: issues@stdcxx.apache.org Subject: [jira] Commented: (STDCXX-860) localedef: missing characters for an ellipsis in LC_CTYPE In-Reply-To: <1908701034.1208037485324.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588332#action_12588332 ] Martin Sebor commented on STDCXX-860: ------------------------------------- That the characters are really missing (and that the {{locale}} utility isn't lying) can be confirmed using the program below: {noformat} $ cat t.cpp && ./t ./ctype #include #include int main (int argc, char *argv[]) { const std::locale loc (1 < argc ? argv [1] : ""); const std::ctype &ct = std::use_facet > (loc); const std::ctype_base::mask masks[] = { ct.lower, ct.space, ct.print, ct.cntrl, ct.alpha, ct.digit, ct.punct, ct.graph, ct.xdigit }; for (unsigned i = 0; i != sizeof masks / sizeof *masks; ++i) { std::printf ("%#x: ", masks [i]); for (unsigned j = 0; j != 256; ++j) { if (ct.is (masks [i], char (j))) std::printf ("\\x%02x ", j); } std::putchar ('\n'); } } 0x10: 0x1: 0x2: 0x4: 0x20: 0x40: 0x80: 0x200: \x64 \x65 \x66 0x100: {noformat} > localedef: missing characters for an ellipsis in LC_CTYPE > --------------------------------------------------------- > > Key: STDCXX-860 > URL: https://issues.apache.org/jira/browse/STDCXX-860 > Project: C++ Standard Library > Issue Type: Bug > Components: Utilities > Affects Versions: 4.2.0 > Reporter: Martin Sebor > Priority: Critical > Fix For: 4.2.2 > > Original Estimate: 4h > Remaining Estimate: 4h > > The {{localedef}} utility appears to skip characters specified using the ellipsis in the {{LC_CTYPE}} section. The output below was obtained on Solaris 10 (the "couldn't set locale correctly" messages are written out by libc). The number of characters specified in the {{ctype.src}} source file is 6 ('a', 'b', 'c', 'd', 'e', and 'f'). The output of the {{locale}} utility shows that the generated locale contains only the last three characters ('d', 'e', and 'f'). > {noformat} > $ cat ctype.src; rm -rf ctype; \ > ./localedef -c -w -f ~/stdcxx/etc/nls/charmaps/ISO-8859-1 -i ctype.src ctype \ > && LC_ALL=ctype ./locale -ck -h -w -l LC_CTYPE > LC_CTYPE > graph a..c;d;e;f > END LC_CTYPE > couldn't set locale correctly > couldn't set locale correctly > LC_CTYPE > # ctype data: > # codeset: "ISO-8859-1" > # charmap: "ISO-8859-1" > # codeset_off: 24 > # charmap_off: 35 > # wmask_s: 3 > # wtoupper_off: 0 > # wtolower_off: 0 > # wmask_off: 0 > # ctype_ext_off: 0 > # mb_cur_max: 1 > upper couldn't set locale correctly > lower > space > print > cntrl > alpha > digit > punct > graph d;e;f > xdigit > toupper > tolower > # ctype stats: > # total characters: 3 > # upper characters: 0 > # lower characters: 0 > # space characters: 0 > # print characters: 0 > # cntrl characters: 0 > # alpha characters: 0 > # digit characters: 0 > # punct characters: 0 > # graph characters: 3 > # xdigit characters: 0 > # unclassified: 0 > # tolower pairs: 0 > # toupper pairs: 0 > END LC_CTYPE > {noformat} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.