Skip to main content
Known Participant
January 11, 2023
Question

How to get japanese filename in a Plug-in application

  • January 11, 2023
  • 2 replies
  • 1550 views

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 has been closed for replies.

2 replies

Participating Frequently
January 20, 2023

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

Legend
January 11, 2023

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

Known Participant
January 12, 2023

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.

Legend
January 12, 2023

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