* [PATCH] localedef: allow %l/%n in postal_fmt [BZ #16983]
@ 2016-04-15 18:53 Mike Frysinger
2016-04-15 19:11 ` Chris Leonard
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2016-04-15 18:53 UTC (permalink / raw)
To: libc-alpha; +Cc: myllynen
ISO 14652/30112 includes %l & %n now, so permit them in our files.
---
locale/programs/ld-address.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/locale/programs/ld-address.c b/locale/programs/ld-address.c
index f133319..bfbdd62 100644
--- a/locale/programs/ld-address.c
+++ b/locale/programs/ld-address.c
@@ -150,8 +150,8 @@ No definition for %s category found"), "LC_ADDRESS"));
}
else
{
- /* We must check whether the format string contains only the
- allowed escape sequences. */
+ /* We must check whether the format string contains only the allowed
+ escape sequences. Last checked against ISO 30112 WD10 [2014]. */
const char *cp = address->postal_fmt;
if (*cp == '\0')
@@ -165,7 +165,7 @@ No definition for %s category found"), "LC_ADDRESS"));
if (*++cp == 'R')
/* Romanize-flag. */
++cp;
- if (strchr ("afdbshNtreCzTSc%", *cp) == NULL)
+ if (strchr ("nafdbshNtreClzTSc%", *cp) == NULL)
{
WITH_CUR_LOCALE (error (0, 0, _("\
%s: invalid escape `%%%c' sequence in field `%s'"),
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] localedef: allow %l/%n in postal_fmt [BZ #16983]
2016-04-15 18:53 [PATCH] localedef: allow %l/%n in postal_fmt [BZ #16983] Mike Frysinger
@ 2016-04-15 19:11 ` Chris Leonard
0 siblings, 0 replies; 2+ messages in thread
From: Chris Leonard @ 2016-04-15 19:11 UTC (permalink / raw)
To: Mike Frysinger; +Cc: libc-alpha, Marko Myllynen
+1 for standards compliance
+1 for useful fields
Field descriptors for the "postal_fmt" keyword:
%n - Person’s name, possibly constructed with the LC_NAME "name_fmt"
keyword.
%l - Local township within town or city
On Fri, Apr 15, 2016 at 2:53 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> ISO 14652/30112 includes %l & %n now, so permit them in our files.
> ---
> locale/programs/ld-address.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/locale/programs/ld-address.c b/locale/programs/ld-address.c
> index f133319..bfbdd62 100644
> --- a/locale/programs/ld-address.c
> +++ b/locale/programs/ld-address.c
> @@ -150,8 +150,8 @@ No definition for %s category found"), "LC_ADDRESS"));
> }
> else
> {
> - /* We must check whether the format string contains only the
> - allowed escape sequences. */
> + /* We must check whether the format string contains only the allowed
> + escape sequences. Last checked against ISO 30112 WD10 [2014]. */
> const char *cp = address->postal_fmt;
>
> if (*cp == '\0')
> @@ -165,7 +165,7 @@ No definition for %s category found"), "LC_ADDRESS"));
> if (*++cp == 'R')
> /* Romanize-flag. */
> ++cp;
> - if (strchr ("afdbshNtreCzTSc%", *cp) == NULL)
> + if (strchr ("nafdbshNtreClzTSc%", *cp) == NULL)
> {
> WITH_CUR_LOCALE (error (0, 0, _("\
> %s: invalid escape `%%%c' sequence in field `%s'"),
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-15 19:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-15 18:53 [PATCH] localedef: allow %l/%n in postal_fmt [BZ #16983] Mike Frysinger
2016-04-15 19:11 ` Chris Leonard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).