.\"
.\" References consulted:
.\" GNU glibc-2 manual
-.\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
+.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
.\" Corrected prototype, 2002-10-18, aeb
.\"
.\" Translated Sun Jul 15 2001
.\" by UCHIDA Norihiro <KY4N-UCD@asahi-net.or.jp>
.\"
-.TH NL_LANGINFO 3 2001-05-11 "GNU" "Linux Programmer's Manual"
+.TH NL_LANGINFO 3 2010-10-03 "GNU" "Linux Programmer's Manual"
.\"O .SH NAME
.\"O nl_langinfo \- query language and locale information
.SH ̾Á°
¤ò»²¾È¤·¤Æ¤Û¤·¤¤¡£
.\"O .SH "RETURN VALUE"
.SH ÊÖ¤êÃÍ
-.\"O If no locale has been selected for the appropriate category,
+.\"O If no locale has been selected by
+.\"O .BR setlocale ()
+.\"O for the appropriate category,
.\"O .BR nl_langinfo ()
.\"O returns a pointer to the corresponding string in the
.\"O "C" locale.
-ŬÀڤʥ«¥Æ¥´¥ê¤Î¥í¥±¡¼¥ë¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢
+ŬÀڤʥ«¥Æ¥´¥ê¤Î¥í¥±¡¼¥ë¤¬
+.BR setlocale ()
+¤Ë¤è¤Ã¤ÆÁªÂò¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢
.BR nl_langinfo ()
¤Ï "C" ¥í¥±¡¼¥ë¤Î¤È¤¤ËÁêÅö¤¹¤ëʸ»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
.PP
.\"O .SH "CONFORMING TO"
.SH ½àµò
SUSv2, POSIX.1-2001.
+.\"O .SH "EXAMPLE"
+.SH Îã
+.\"O The following program sets the character type locale according to the
+.\"O environment and queries the terminal character set.
+°Ê²¼¤Î¥×¥í¥°¥é¥à¤Ï¡¢´Ä¶ÊÑ¿ô¤Ë´ð¤¤¤Æʸ»ú·¿ (character type) ¤Î¥í¥±¡¼¥ë
+¤òÀßÄꤷ¡¢Ã¼Ëö¤Îʸ»ú½¸¹ç¤ÎÌ䤤¹ç¤ï¤»¤ò¹Ô¤¦¡£
+.LP
+.nf
+#include <langinfo.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main(int argc, char *argv[])
+{
+ setlocale(LC_CTYPE,"");
+ printf("%s\\n",nl_langinfo(CODESET));
+ exit(EXIT_SUCCESS);
+}
+.fi
.\"O .SH "SEE ALSO"
.SH ´ØÏ¢¹àÌÜ
.BR locale (1),