2 Replies Latest reply: Sep 20, 2013 7:16 AM by donneltc RSS

    Getting PDF filename with unicode chars

    donneltc Community Member

      Hello,

      I'm trying to write a plugin that gets the file path of the current active document. The code looks like this:

       

      AVDoc avDoc = AVAppGetActiveDoc();
      PDDoc pdDoc = AVDocGetPDDoc(avDoc);
      ASFile file = PDDocGetFile (pdDoc);
      ASPathName filePath = ASFileAcquirePathName (file);

       

      This works fine for most documents, but for documents with unicode characters in the name each unicode character is replaced with '.' in filePath. For example, if the document is "测试中文关键词搜索!@#$%^&().pdf", then filePath becomes ".........!@#$%^&().pdf". Am I missing something required to get unicode filenames?

       

      Thanks.