Skip to main content
Participating Frequently
September 26, 2024
Answered

在premiere中开发effect的时候,出现中文乱码

  • September 26, 2024
  • 2 replies
  • 689 views

premiere pro c++ sdk开发effect,使用PF_ADD_ANGLE或者PF_ADD_FIXED的时候,设置给PF_ParamDef的name如果是中文的话,会出现乱码,且如果设置的中文是奇数个的时候是正常的,只有偶数个的时候才出现乱码。

premiere pro的版本是22.6.2,mac是Apple M2,macOS sonama 14.1。

请问是什么原因?如何解决此问题?谢谢。

谢谢。

This topic has been closed for replies.
Correct answer davinacotter

Effect parameter strings must currently be encoded in the current code page, not UTF8.

(Win: GetACP(), mac  CFStringGetSystemEncoding()). you can provide differently encoded strings depending on the code page. please try that and let us know.

-DaveC

2 replies

davinacotter
Adobe Employee
davinacotterCorrect answer
Adobe Employee
October 9, 2024

Effect parameter strings must currently be encoded in the current code page, not UTF8.

(Win: GetACP(), mac  CFStringGetSystemEncoding()). you can provide differently encoded strings depending on the code page. please try that and let us know.

-DaveC

Participating Frequently
October 14, 2024

是这个原因,问题已经解决,谢谢

Bruce Bullis
Legend
October 4, 2024

I have no idea what the reason is, but we can take a look; can you share your plugin source code? Private upload space available upon request.

Participating Frequently
October 8, 2024

这是PF_Cmd_PARAMS_SETUP时候我调用的demo,目前"分辨率补"是必现乱码,不知道demo是否有什么问题?谢谢

static PF_Err ParamsSetup(

    PF_InData* in_data,

    PF_OutData* out_data,

    PF_ParamDef* params[],

    PF_LayerDef* output)

{

    PF_ParamDef    def;

    

    //Resolution

    AEFX_CLR_STRUCT(def);

    def.flags = PF_ParamFlag_SUPERVISE | PF_ParamFlag_CANNOT_INTERP;

    def.ui_flags = PF_PUI_STD_CONTROL_ONLY;

    PF_ADD_POPUP("分辨率补",

                 12,

                 12,

                 "自定义00|"

                 "自定义01|"

                 "自定义02|"

                 "自定义03|"

                 "自定义04|"

                 "自定义05|"

                 "自定义06|"

                 "自定义07|"

                 "自定义08|"

                 "自定义09|"

                 "自定义10|"

                 "自定义11",

                 1);

    

    out_data->num_params = 2;

    return PF_Err_NONE;

}

Participating Frequently
October 9, 2024

 这是上述demo的运行结果