From 2bdb6b81be7d731ad02b8fe630fdacfd707b59bc Mon Sep 17 00:00:00 2001 From: Vincent Privat Date: Mon, 29 Jul 2024 22:07:58 +0200 Subject: [PATCH] fix locale to en-US --- .../Java/JavaRunner.cs | 2 +- .../MetadataExtractor.MediaLibraryProcessor/Program.cs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/dotnet/MetadataExtractor.MediaLibraryProcessor/Java/JavaRunner.cs b/src/dotnet/MetadataExtractor.MediaLibraryProcessor/Java/JavaRunner.cs index ac58e553..8506e3d4 100644 --- a/src/dotnet/MetadataExtractor.MediaLibraryProcessor/Java/JavaRunner.cs +++ b/src/dotnet/MetadataExtractor.MediaLibraryProcessor/Java/JavaRunner.cs @@ -36,7 +36,7 @@ public static async Task RunAsync(string repoRoot) // Output will differ across different Java runtimes. // Output has historically been produced by: // C:\\Program Files\\Java\\jdk1.8.0_271\\bin\\java.exe - FileName = """C:\Program Files\Java\jdk-18.0.2.1\bin\java.exe""", + FileName = "java.exe", Arguments = string.Join( " ", "-classpath", $"\"{xmpCoreLibraryPath}\";{javaSrcRoot}", diff --git a/src/dotnet/MetadataExtractor.MediaLibraryProcessor/Program.cs b/src/dotnet/MetadataExtractor.MediaLibraryProcessor/Program.cs index 9357665b..26f60b81 100644 --- a/src/dotnet/MetadataExtractor.MediaLibraryProcessor/Program.cs +++ b/src/dotnet/MetadataExtractor.MediaLibraryProcessor/Program.cs @@ -3,13 +3,19 @@ using MetadataExtractor.MediaLibraryProcessor; using System; +using System.Globalization; using System.IO; +using System.Threading; // TODO support building libraries from source too // TODO more robust way of finding repo root path string repoRoot = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, """..\..\..\..\..\..""")); +var culture = CultureInfo.GetCultureInfo("en-US"); +Thread.CurrentThread.CurrentCulture = culture; +Thread.CurrentThread.CurrentUICulture= culture; + // Update .NET and Java metadata files await Console.Out.WriteLineAsync("Updating metadata files..."); @@ -26,3 +32,4 @@ await DiffRunner.RunAsync(repoRoot); await Console.Out.WriteLineAsync("Done."); +