This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/1230] New: INF not accepted by strtod in Turkish locales (tr_TR.iso88599)
- From: "vincent+libc at vinc17 dot org" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 22 Aug 2005 22:28:51 -0000
- Subject: [Bug libc/1230] New: INF not accepted by strtod in Turkish locales (tr_TR.iso88599)
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
The ISO C standard requires "INF" to be accepted by strtod:
-- one of INF or INFINITY, ignoring case
But in Turkish locales (LC_ALL=tr_TR.iso88599), where the lowercase 'I' is the
dotless 'i', "INF" (or similar) is not recognized as the infinity. This can be
seen with the following program and LC_ALL="tr_TR.iso88599". Tested under Debian
with the libc6 2.3.5-4 package.
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
int main (void)
{
double x;
char *end;
int err;
if (setlocale (LC_ALL, "") == NULL)
{
fprintf (stderr, "Can't set locales\n");
exit (EXIT_FAILURE);
}
x = strtod ("INF", &end);
err = *end != '\0';
printf ("x = %f - error: %s\n", x, err ? "yes" : "no");
return err;
}
--
Summary: INF not accepted by strtod in Turkish locales
(tr_TR.iso88599)
Product: glibc
Version: 2.3.5
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: vincent+libc at vinc17 dot org
CC: glibc-bugs at sources dot redhat dot com
http://sources.redhat.com/bugzilla/show_bug.cgi?id=1230
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.