-
Notifications
You must be signed in to change notification settings - Fork 851
Labels
Milestone
Description
There appears to be a bug where (at least) on Thai culture settings, closing parentheses appear into interpolated strings. Seems to be an F# specific issue?
Repro steps
open System.Globalization
open System.Threading
type Test = { Name: string } with override this.ToString() = this.Name
let staticString = "Static string"
let number = 1.5
let obj = { Name = "Test" }
Thread.CurrentThread.CurrentCulture <- CultureInfo("th")
let interpolated1 = $"{obj} {number} {staticString}"
let interpolated2 = $"%O{obj} %O{number} %s{staticString}"
let formatted = sprintf "%O %O %s" obj number staticString
printfn "%s" interpolated1
printfn "%s" interpolated2
printfn "%s" formatted
Expected behavior
Prints:
Test 1.5 Static string
Test 1.5 Static string
Test 1.5 Static string
Actual behavior
Prints:
Test) 1.5) Static string)
Test 1.5 Static string
Test 1.5 Static string
Known workarounds
As in the above example, using format specifiers appears to prevent this.
Related information
- Windows 11
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done