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

@timoi

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.

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