Bug 10497 - Add YESSTR and NOSTR for en_US and POSIX locales
Summary: Add YESSTR and NOSTR for en_US and POSIX locales
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: localedata (show other bugs)
Version: 2.11
: P2 normal
Target Milestone: ---
Assignee: GNU C Library Locale Maintainers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-07 12:49 UTC by Petr Machata
Modified: 2014-07-01 07:21 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
fix for this problem (484 bytes, patch)
2009-08-07 12:53 UTC, Petr Machata
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Machata 2009-08-07 12:49:04 UTC
YESSTR and NOSTR selector to nl_langinfo don't have locale data for POSIX and
en_US (and possibly others, these are just the two that happen to be important
for me).  Many locales do have these strings, which seems to indicate that it's
just missing data rather than the feature not being supported.  I'll attach a
patch that adds these strings.

Reproducer:

$ cat y.c
#define _GNU_SOURCE
#include <locale.h>
#include <langinfo.h>
#include <stdio.h>

int main (void) {
  setlocale (LC_ALL, "");
  printf ("|%s|%s|\n", nl_langinfo (YESEXPR), nl_langinfo (YESSTR));
}

$ gcc y.c -o y
$ LANG=C ./y
|^[yY]||
$ LANG=en_US ./y
|^[yY].*||
Comment 1 Petr Machata 2009-08-07 12:53:47 UTC
Created attachment 4121 [details]
fix for this problem
Comment 2 Ulrich Drepper 2009-10-30 05:30:49 UTC
I've applied the patch.