diff --git a/LvglProjectFileUpdater/LvglWindowsLibraryProjectUpdater.cs b/LvglProjectFileUpdater/LvglWindowsLibraryProjectUpdater.cs index 34277ad..366fb92 100644 --- a/LvglProjectFileUpdater/LvglWindowsLibraryProjectUpdater.cs +++ b/LvglProjectFileUpdater/LvglWindowsLibraryProjectUpdater.cs @@ -216,7 +216,13 @@ public static void Run() foreach (var CurrentName in NewSourceNames) { - ProjectRoot.AddItem("ClCompile", CurrentName.Item1); + { + ProjectItemElement Item = + ProjectRoot.AddItem("ClCompile", CurrentName.Item1); + Item.AddMetadata( + "AdditionalOptions", + "/utf-8 %(AdditionalOptions)"); + } { ProjectItemElement Item = diff --git a/LvglProjectFileUpdater/Program.cs b/LvglProjectFileUpdater/Program.cs index 7ea3541..d6ae6aa 100644 --- a/LvglProjectFileUpdater/Program.cs +++ b/LvglProjectFileUpdater/Program.cs @@ -217,7 +217,13 @@ static void UpdateLvglWindowsSimulator() foreach (var CurrentName in NewSourceNames) { - ProjectRoot.AddItem("ClCompile", CurrentName.Item1); + { + ProjectItemElement Item = + ProjectRoot.AddItem("ClCompile", CurrentName.Item1); + Item.AddMetadata( + "AdditionalOptions", + "/utf-8 %(AdditionalOptions)"); + } { ProjectItemElement Item = @@ -354,7 +360,13 @@ static void UpdateLvglWindowsDesktopApplication() foreach (var CurrentName in NewSourceNames) { - ProjectRoot.AddItem("ClCompile", CurrentName.Item1); + { + ProjectItemElement Item = + ProjectRoot.AddItem("ClCompile", CurrentName.Item1); + Item.AddMetadata( + "AdditionalOptions", + "/utf-8 %(AdditionalOptions)"); + } { ProjectItemElement Item =