• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

UTF characters in the filename(Windows platform)

New Here ,
Oct 22, 2009 Oct 22, 2009

Copy link to clipboard

Copied

Hello all,

I want to know how to get the name of the document that contains UTF characters.

The current implementation of code:

BSTR l_fileInfoBSTR = NULL;
IActionReference l_docRef( m_photoshop->MakeReference() );
l_docRef.PutProperty( classProperty, keyFileReference );
l_docRef.PutIdentifier( classDocument, l_doc_id );

IActionDescriptor l_docDesc;
m_action_ctrl->GetActionProperty( l_docRef, (IDispatch**)&l_docDesc );

long hasKey = false;
l_docDesc.HasKey( keyFileReference, &hasKey );

if( hasKey )
{
      l_docDesc.GetPath( keyFileReference, &l_fileInfoBSTR );
}

Thanks.

TOPICS
SDK

Views

991

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Contributor ,
Oct 30, 2009 Oct 30, 2009

Copy link to clipboard

Copied

In the C++ world you have to initalize alias to 'utxt' before retreiving the value in order to get the unicode path back. E.g.:

  Handle        pathAlias(reinterpret_cast<Handle>('utxt'));

  sPSActionDescriptor->GetAlias(desc, keyFileReference, pathAlias)

etc

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 02, 2009 Nov 02, 2009

Copy link to clipboard

Copied

Hello ilvar,

Thank you for your reply, but now the function AliasToFullPath always return 'txtu6' string.

What do you think about it?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 03, 2009 Nov 03, 2009

Copy link to clipboard

Copied

On Win platform try skipping first 12 bytes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2009 Nov 04, 2009

Copy link to clipboard

Copied

Hello Ilya,

Thanks a lot, it is look like little trick .

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 05, 2009 Nov 05, 2009

Copy link to clipboard

Copied

LATEST

Awesome. Glad it helped.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2009 Nov 04, 2009

Copy link to clipboard

Copied

Answered!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines