Skip to main content
Solved

GetPublishedParamNames function return garbled code when the param name is Chinese or other unicode character


26642523
Contributor
Forum|alt.badge.img+1

Does anyone have a solution to this?

Best answer by hkingsbury

It’s probably worth also opening up a support case with Safe and linking this thread

View original
Did this help you find an answer to your question?

4 replies

j.botterill
Influencer
Forum|alt.badge.img+40
  • Influencer
  • May 6, 2025

sorry there is not enough context here to debug your problem. Here is how to place good support requests

https://support.safe.com/hc/en-us/articles/25407438078349-How-to-Create-a-Great-FME-Form-Support-Case 

there is an attachment icon on these windows


26642523
Contributor
  • Author
  • Contributor
  • May 6, 2025

FME Workspace file: test.zip, we created a published parameter named “测试”.

#include <isession.h>
#include <iworkspacerunner.h>
int main()
{
    IFMESession* session;
    FME_MsgNum err = FME_createSession(session);
    if (err)
    {
        return 0;
    }
    err = session->init(NULL);

    IFMEWorkspaceRunner* runner = session->createWorkspaceRunner();
    IFMEStringArray* array = session->createStringArray();
    IFMEString* str = session->createString();

    *str = "test.fmw";
    runner->getPublishedParamNames(*str, *array);

    for (size_t i = 0; i < array->entries(); i++)
    {
        std::string item = (*array)(i);
        printf("%s\n", item.c_str());
    }
    session->destroyString(str);
    session->destroyStringArray(array);
}

 

After resolving the workspace file, the parameter’s name will be “????”.


hkingsbury
Celebrity
Forum|alt.badge.img+54
  • Celebrity
  • Best Answer
  • May 6, 2025

It’s probably worth also opening up a support case with Safe and linking this thread


j.botterill
Influencer
Forum|alt.badge.img+40
  • Influencer
  • May 19, 2025

yeap thats what I suggested in first response


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings