From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9756 invoked by alias); 28 Sep 2012 12:05:55 -0000 Received: (qmail 9719 invoked by uid 22791); 28 Sep 2012 12:05:51 -0000 X-SWARE-Spam-Status: No, hits=0.9 required=5.0 tests=AWL,BAYES_00,KHOP_DYNAMIC,RDNS_DYNAMIC X-Spam-Check-By: sourceware.org Date: Fri, 28 Sep 2012 12:05:00 -0000 From: Keld Simonsen To: "bugzilla at tecnocode dot co.uk" Cc: libc-locales@sources.redhat.com Subject: Re: [Bug localedata/14641] New: Add a strftime()-like function for formatting human names Message-ID: <20120928120543.GA29678@rap.rap.dk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact libc-locales-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-locales-owner@sourceware.org X-SW-Source: 2012-q3/txt/msg00075.txt.bz2 On Fri, Sep 28, 2012 at 11:33:42AM +0000, bugzilla at tecnocode dot co.uk wrote: > > http://sourceware.org/bugzilla/show_bug.cgi?id=14641 > > Bug #: 14641 > Summary: Add a strftime()-like function for formatting human > names > Product: glibc > Version: unspecified > Status: NEW > Severity: enhancement > Priority: P2 > Component: localedata > AssignedTo: unassigned@sourceware.org > ReportedBy: bugzilla@tecnocode.co.uk > CC: libc-locales@sources.redhat.com > Classification: Unclassified > > > It???s useful that glibc???s locale data collects together different locales??? ways > of formatting names as name_fmt (lh.2xlibre.net/values/name_fmt/). However, > this is difficult to use, and requires programs to implement their own parser > for the field descriptors. This causes duplication of code and means all the > programs have to be kept up-to-date with any changes to the set of allowed > field descriptors. > > Would it be possible to add a function similar to strftime() which will parse a > *name* format string and substitute values for its field descriptors? yes, this is possible. I think it would be better to have one standardized way than several homegrown. Coul we find out what are the different current APIs vailable in different implementations?