当前位置:网站首页>iconv_ Open returns error code 22

iconv_ Open returns error code 22

2022-06-25 14:59:00 qq_ twenty-three million nine hundred and fifty-three thousand

Transcoding related dynamic libraries are stored in /usr/lib64/gconv Under the table of contents

If this directory is empty , The call fails , Can copy from other machines gconv The dynamic library under the directory is transferred to the current device

#include <iconv.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
int main()
{
int i = (int)iconv_open(“UTF-8”, “GBK”);
if(i < 0)
{
printf(“num:%d—%s\n”,errno,strerror(errno));
}
else
{
printf(“success\n”);
}
return 0;
}

原网站

版权声明
本文为[qq_ twenty-three million nine hundred and fifty-three thousand ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202200514581608.html