[AE开发]如何使用插件 SDK 将 A_char 数组解码为中文字符串?

原贴:https://community.adobe.com/t5/after-effects-discussions/how-to-decode-a-char-array-into-chinese-string-using-plugin-sdk/td-p/12809920

int code_convert(char *from_charset,char *to_charset,char *inbuf,int inlen,char *outbuf,int outlen)
{
        iconv_t cd;
        int rc;
        char **pin = &inbuf;
        char **pout = &outbuf;
        cd = iconv_open(to_charset,from_charset);
        if (cd==0) return -1;
        memset(outbuf,'\0',outlen);
        if (iconv(cd,pin,(size_t *)&inlen,pout,(size_t*)&outlen)==-1) return -1;
        iconv_close(cd);
        return 0;
}
char  gb2312Char[255] = "";
code_convert("gb2312","utf-8",proj_nameAC,strlen(proj_nameAC),gb2312Char,255);

给TA充电
共{{data.count}}人
人已充电
AE插件开发

[AE开发]使用OpenCV 与插件集成

2022-11-1 19:31:01

AEAE文章

只用AE全流程制作2d/3d唱片

2022-12-7 14:58:53

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
今日签到
搜索