Skip to main content
Known Participant
Jan 11, 2023 12:50 PM UTC
Question

How to get japanese filename in a Plug-in application

Hi   I am using below code to get active doc file name in my plug-in application,

 

ASPathName asSourcePath = ASFileAcquirePathName(PDDocGetFile(pdDoc));
char *lsSourcePath = ASFileSysDIPathFromPath(ASGetDefaultFileSys(), asSourcePath, NULL);

 

it is fine for English text, but when I have Japanese text in the file name, it is not,

how can I obtain Japanese text file name for an active document?  Any help would be highly appreciated.

thanks

This topic is closed to new replies. Start a new post to keep the conversation going.

9 replies

Participating Frequently
Jan 20, 2023 7:09 AM UTC

TCHAR* lsSourcePath= ASFileSysDisplayStringFromPath (ASGetDefaultFileSys(), asSourcePath);

Translate
Legend
Jan 11, 2023 4:43 PM UTC

Please provide a hex dump of the DIPath returned, and the actual filename in Japanese characters.

Translate
Known Participant
Jan 12, 2023 10:23 AM UTC

Thanks for your reply,  Sorry I couldn't get Hexdump,  but

these are the values I getting during debugging. 

"C:\\........pdf" ,   and the actual file path is 

C:\容器及び施栓系.pdf     

Please help me to get correct Japanese text for the filename.

Translate
Legend
Jan 12, 2023 10:40 AM UTC

Please learn how to hex dump a C string, and tell us the hex dump. Or, read the hex values from the debugger.

Translate