Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.
This repository was archived by the owner on Jan 27, 2025. It is now read-only.

CLR type decimal not working correctly if thread CultureInfo has "," as a decimal separator #97

Description

@timoi

This code seems to fail:

Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("fi-FI");
var ctx = new IronJS.Hosting.CSharp.Context();
ctx.SetGlobal("decimalVal", 1.5m);
Assert.True(ctx.Execute("decimalVal < 3"), "1.5 should be smaller");

Works ok if the CurrentCulture is something like "en-US" where "." is used as a decimal separator.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions