Converting PMString to std::wstring in InDesign CS6


i'd have filepath of resource of opened document std::wstring.

 

i can filepath of resource pmstring:

interfaceptr< ilinkresource > presource( getdatabase( linkmanager ), resourceuidref.getuid(), usedefaultiid() );

pmstring resourcefilepath = presource->getlongname( false );

 

the problem i'd have convert pmstring std::wstring without losing of information. path may contain special characters arabic or chinese converting string std::string getplatformstring() won't job done.

 

should grab pmstring or should use widestring getlongname() , somehow conversion done that? stringutils has convertwidestringtoutf8 seems give out std::string.

 

so put long story short: how correctly convert pmstring std::wstring?

 

the plug-in used in windows environment.

hi

 

if wchar_t type 16bit long can try cast pmstring::grabutf16buffer

 

regards

bartek



More discussions in InDesign SDK


adobe

Comments

Popular posts from this blog

Some mp4 files not displaying correctly (CS6)

Thread: Samba is not authenticating with LDAP