1 2 3 4 5 6 | #include <iconv.h> iconv_t iconv_open(const char *tocode, const char *fromcode); int iconv_close(iconv_t cd); size_t iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | $ cat /proc/self/maps ... 085a2000-085c3000 rw-p 085a2000 00:00 0 [heap] b7a90000-b7acf000 r--p 00000000 08:08 740190 /usr/lib/locale/zh_CN.utf8/LC_CTYPE b7acf000-b7ad0000 r--p 00000000 08:08 729171 /usr/lib/locale/en_US.utf8/LC_NUMERIC b7ad0000-b7ad1000 r--p 00000000 08:08 781364 /usr/lib/locale/en_US.utf8/LC_TIME b7bbd000-b7dbd000 r--p 00000000 08:08 704987 /usr/lib/locale/locale-archive b7dbd000-b7dbe000 rw-p b7dbd000 00:00 0 b7dbe000-b7f1a000 r-xp 00000000 08:08 852866 /lib/tls/i686/cmov/libc-2.9.so ... b7f27000-b7f2e000 r--s 00000000 08:08 704989 /usr/lib/gconv/gconv-modules.cache ... b7f32000-b7f4e000 r-xp 00000000 08:08 827406 /lib/ld-2.9.so ... |
1 2 3 4 5 | #include <nl_types.h> nl_catd catopen(const char *name, int flag); int catclose(nl_catd catalog); char *catgets(nl_catd catalog, int set_number, int message_number, const char *message); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | /* intl/bindtextdom.c */ static void set_binding_values (domainname, dirnamep, codesetp) const char *domainname; const char **dirnamep; const char **codesetp; { ... } /* 函数 bindtextdomain */ char * BINDTEXTDOMAIN (domainname, dirname) const char *domainname; const char *dirname; { set_binding_values (domainname, &dirname, NULL); return (char *) dirname; } /* 函数 bind_textdomain_codeset */ char * BIND_TEXTDOMAIN_CODESET (domainname, codeset) const char *domainname; const char *codeset; { set_binding_values (domainname, NULL, &codeset); return (char *) codeset; } |
1 2 3 4 5 6 7 8 9 10 | #include <langinfo.h> char *nl_langinfo(nl_item item); /* locale/nl_langinfo.c */ char * nl_langinfo (item) nl_item item; { return __nl_langinfo_l (item, _NL_CURRENT_LOCALE); } |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |