Subject: Re: lib/31874
To: None <tshiozak@netbsd.org, netbsd-bugs@netbsd.org,>
From: OBATA Akio <obata@lins.jp>
List: netbsd-bugs
Date: 11/05/2005 14:06:09
Good!
Following source works fine on daily snapshot of HEAD/200510300000Z/macppc.
#include <iconv.h>
#include <errno.h>
#include <stdlib.h>
int main() {
const char* src="\033$B%F%9%H\033(B";
int srcn = 12;
char* dst;
int dstn = 24;
char* rslt;
iconv_t cd;
dst = malloc(24);
rslt=dst;
puts(src);
cd = iconv_open("UTF-8", "iso-2022-jp");
if(iconv(cd, &src, &srcn, &dst, &dstn) == (size_t)-1)
perror(NULL);
iconv_close(cd);
puts(rslt);
free(rslt);
}