FreeBSD Bugzilla – Attachment 224718 Details for
Bug 255646
newlocale(LC_ALL_MASK, (locale_t) 0) wrongly destroys LC_COLLATE in an existing object
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
.c that illustrates the bug
freebsd_bug.c.txt (text/plain), 969 bytes, created by
Karl Williamson
on 2021-05-06 01:13:04 UTC
(
hide
)
Description:
.c that illustrates the bug
Filename:
MIME Type:
Creator:
Karl Williamson
Created:
2021-05-06 01:13:04 UTC
Size:
969 bytes
patch
obsolete
>#include <locale.h> >#include <stdio.h> > >int >main () >{ > locale_t C = newlocale(LC_ALL_MASK, "C", (locale_t) 0); > locale_t P; > > fprintf(stderr, "LC_COLLATION after making C is %s\n", querylocale(LC_COLLATE_MASK, C)); > > P = newlocale(LC_ALL_MASK, "POSIX", (locale_t) 0); > > /* Creating a new locale from scratch should have no effect on an existing > * one. LC_COLLATE seems to be the only broken category */ > fprintf(stderr, "LC_COLLATION should remain C, but instead is %s\n", querylocale(LC_COLLATE_MASK, C)); > fprintf(stderr, "LC_CTYPE should remain C, and in fact is %s\n", querylocale(LC_CTYPE_MASK, C)); > fprintf(stderr, "LC_NUMERIC should remain C, and in fact is %s\n", querylocale(LC_NUMERIC_MASK, C)); > fprintf(stderr, "LC_MONETARY should remain C, and in fact is %s\n", querylocale(LC_MONETARY_MASK, C)); > fprintf(stderr, "LC_MESSAGES should remain C, and in fact is %s\n", querylocale(LC_MESSAGES_MASK, C));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 255646
: 224718