Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-100319

QAxObject 韩语字符串无法正常工作(error when using Korean text for QAxObject )

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.10
    • Active Qt
    • None
    • Windows

    Description

      使用QAxObject 调用创建桌面快捷方式,在路径是英文和中文情况下,都可以正常创建快捷方式;而使用包含韩语的路径时候,则创建出来的路径韩语部分都是问号 代码如下:when using QAxObject  to create shortcut in windows,it works in English and Chinese,but Korean; When path contains Korean text,it doesn't work .

       

      //代码占位符
      
      void SetupMain::createShortCut(const QString &src, const QString &dest, const QString &iconPath)
      { QAxObject comObj("WScript.Shell"); 
      if (comObj.isNull()) { qDebug() << " null "; return; } comObj.dynamicCall("SetCurrentDirectory(QString)", getInstallPath()); 
      auto obj = comObj.querySubObject("CreateShortcut(QString)", dest); 
      if (obj == nullptr || obj->isNull()) { return; } 
      obj->dynamicCall("SetWorkingDirectory(QString)", getInstallPath());
       obj->dynamicCall("SetTargetPath(QString)", src); 
      if (!iconPath.isEmpty()) { obj->dynamicCall("SetIconLocation(QString)", iconPath); } 
      obj->dynamicCall("Save()"); 
      obj->deleteLater();
      }
      
      
      
      

       

       

       

      中文:Chinese Path

      E:\中文路径

      创建快捷方式是正常的

       

      韩文:Korean Path

      E:\ㅇㅁㅈㅇㅁㅈㅇㅁㅈㅇ맞아\PRISMLiveStudio

      Qt的C++代码能够正常的执行该路径的读写,唯一就是快捷方式无法正常创建

      Other C++ code can work and access files of the path which contains Korean text,but create shortcut with QAxObject 

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            zzc116433008 柱超 张
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes