0
How to decode A_char array into Chinese string using plugin SDK?
Explorer
,
/t5/after-effects-discussions/how-to-decode-a-char-array-into-chinese-string-using-plugin-sdk/td-p/12809920
Mar 13, 2022
Mar 13, 2022
Copy link to clipboard
Copied
The name of the project is 测试.aep in Chinese, How can I convert proj_nameAC to Chinese string?
TOPICS
SDK
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/after-effects-discussions/how-to-decode-a-char-array-into-chinese-string-using-plugin-sdk/m-p/12809943#M195688
Mar 13, 2022
Mar 13, 2022
Copy link to clipboard
Copied
perhpas AEGP_GetProjectPath which returns a utf16 string?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
shell22398911sc0d
AUTHOR
Explorer
,
/t5/after-effects-discussions/how-to-decode-a-char-array-into-chinese-string-using-plugin-sdk/m-p/12809985#M195689
Mar 13, 2022
Mar 13, 2022
Copy link to clipboard
Copied
In this way, it can be converted into Chinese, but this way uses python
https://stackoverflow.com/questions/2190904/how-to-correct-the-misencoded-string
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/after-effects-discussions/how-to-decode-a-char-array-into-chinese-string-using-plugin-sdk/m-p/12810185#M195694
Mar 13, 2022
Mar 13, 2022
Copy link to clipboard
Copied
it's a multibyte string. it can be handled via c/c++.
https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
shell22398911sc0d
AUTHOR
Explorer
,
/t5/after-effects-discussions/how-to-decode-a-char-array-into-chinese-string-using-plugin-sdk/m-p/12810915#M195716
Mar 13, 2022
Mar 13, 2022
Copy link to clipboard
Copied
thanks for your help, how to convert multybyte to wide char on mac?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
shell22398911sc0d
AUTHOR
Explorer
,
LATEST
/t5/after-effects-discussions/how-to-decode-a-char-array-into-chinese-string-using-plugin-sdk/m-p/12810956#M195720
Mar 13, 2022
Mar 13, 2022
Copy link to clipboard
Copied
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);
this code works for me,thank you again for your help.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

