From f64752f64a0fb6cddd1f5ed9a696408893ba6555 Mon Sep 17 00:00:00 2001 From: Arnob Paul Date: Sun, 6 Mar 2022 23:56:16 -0500 Subject: [PATCH] Support unicode file paths --- SymlinkCreator/Properties/AssemblyInfo.cs | 4 ++-- SymlinkCreator/core/SymlinkAgent.cs | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/SymlinkCreator/Properties/AssemblyInfo.cs b/SymlinkCreator/Properties/AssemblyInfo.cs index 9d4e212..19324ce 100644 --- a/SymlinkCreator/Properties/AssemblyInfo.cs +++ b/SymlinkCreator/Properties/AssemblyInfo.cs @@ -52,5 +52,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.0")] -[assembly: AssemblyFileVersion("1.1.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0")] +[assembly: AssemblyFileVersion("1.2.0")] \ No newline at end of file diff --git a/SymlinkCreator/core/SymlinkAgent.cs b/SymlinkCreator/core/SymlinkAgent.cs index c898357..13d3884 100644 --- a/SymlinkCreator/core/SymlinkAgent.cs +++ b/SymlinkCreator/core/SymlinkAgent.cs @@ -56,6 +56,10 @@ public void CreateSymlinks() DateTime.Now.Ticks.ToString() + ".bat"; ScriptExecutor scriptExecutor = new ScriptExecutor(scriptFileName); + // set code page to UTF-8 to support unicode file paths + scriptExecutor.WriteLine("chcp 65001 >NUL"); + + // go to destination path scriptExecutor.WriteLine(_splittedDestinationPath[0]); scriptExecutor.WriteLine("cd \"" + _destinationPath + "\"");