Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

In Windows: application.openurl() and unicode path for external apps do not launch

Discussion in 'Scripting' started by hsler, Sep 20, 2018.

  1. hsler

    hsler

    Joined:
    May 17, 2017
    Posts:
    1
    Hi,

    I am using Application.OpenURL() to launch an image.

    This works.
    Code (CSharp):
    1.  
    2.     path = "C:/Users/admin/Pictures/cat.jpg";
    3.     Application.OpenURL(path);
    4.  
    This one DO NOT work
    Code (CSharp):
    1.  
    2.     // Unity Forum do not allow Chinese Characters as it is spam????
    3.     path = "D:/Projects/etl-launcherXX/cat.jpg";
    4.     Application.OpenURL(path);
    5.  
    Example, replaced XX with Chinese characters
    unicode_path_code.png

    To make the path with Chinese characters work, we need to change the language for non-Unicode Program from English to Chinese:
    windows_non-unicode_language.png

    This happens with Windows 7 and Windows 10.
    This do not solve the problem. If the user install the app into a path with Indian, spanish, the application will have problem.
    How do we make sure the launching of unicode path regardless of language?
    I have tested unity 5.6, 2017, both versions having the same problem.

    Is Unity for Windows not a unicode program?
     
    Last edited: Sep 20, 2018