Skip to content

Commit

Permalink
Merge pull request #670 from mcneel/AndyPayne/CultureUS
Browse files Browse the repository at this point in the history
forcing compute.geometry to use en-US culture. Bumping version to 0.1…
  • Loading branch information
andyopayne committed Aug 8, 2024
2 parents a3ea085 + 1215585 commit a2ca6e6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.HOPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.16.10] - 2024-08-08

### Fixed

- Adding a fix to enfoce the localization culture of Compute.Geometry to use the CultureInfo("en-US"). This should hopefully fix some issues where users from various countries have trouble with strings converting to numbers because of comma and/or decimal separators.

## [0.16.9] - 2024-07-03

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/hops/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public GhaAssemblyInfo()
TheAssemblyInfo = this;
}

public const string AppVersion = "0.16.9.0";
public const string AppVersion = "0.16.10.0";

public override Bitmap Icon
{
Expand Down
3 changes: 3 additions & 0 deletions src/rhino.compute/ComputeChildren.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Threading;
using Serilog;

namespace rhino.compute
Expand Down Expand Up @@ -189,6 +191,7 @@ static void LaunchCompute(Queue<Tuple<Process, int>> processQueue, bool waitUnti

var startInfo = new ProcessStartInfo(pathToCompute);
var rhinoProcess = Process.GetCurrentProcess();
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
string commandLineArgs = $"-port:{port} -childof:{rhinoProcess.Id}";
if (!string.IsNullOrEmpty(RhinoSysDir))
{
Expand Down
3 changes: 3 additions & 0 deletions src/rhino.compute/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ namespace rhino.compute
using Serilog.Events;
using Microsoft.Extensions.Configuration;
using System.IO;
using System.Globalization;
using System.Threading;

public class Program
{
Expand Down Expand Up @@ -63,6 +65,7 @@ compute.geometry.exe processes will shut down and stop incurring core hour billi

public static void Main(string[] args)
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Config.Load();
Log.Logger = new LoggerConfiguration()
.ReadFrom.Configuration(Configuration)
Expand Down

0 comments on commit a2ca6e6

Please sign in to comment.