Skip to main content
Solved

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

  • May 6, 2025
  • 4 replies
  • 63 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

j.botterill
Influencer
Forum|alt.badge.img+53
  • Influencer
  • 386 replies
  • 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
  • 1 reply
  • 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+63
  • Celebrity
  • 1625 replies
  • 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+53
  • Influencer
  • 386 replies
  • May 19, 2025

yeap thats what I suggested in first response