char *e( char *s ) { static char buf[256]; size_t in = strlen(s); size_t out = sizeof(buf)-1; char *p = buf; iconv_t cd = iconv_open("SJIS","EUCJP"); iconv( cd, &s, &in, &p, &out ); iconv_close(cd); *p = '\0'; return buf; }
char *e( char *s ) { static char buf[256]; size_t in = strlen(s); size_t out = sizeof(buf)-1; char *p = buf; iconv_t cd = iconv_open("SJIS","EUCJP"); iconv( cd, &s, &in, &p, &out ); iconv_close(cd); *p = '\0'; return buf; }