Fable.Python icon indicating copy to clipboard operation
Fable.Python copied to clipboard

string format specifier '{i:X4}' not working

Open thautwarm opened this issue 4 years ago • 2 comments

let i = 123

$"\\u{i:X4}" # 
val it: string = "\u007B"

However it produces \u%P(X4) in 4.0.0-alpha-020...

thautwarm avatar Dec 31 '21 22:12 thautwarm

workaround:

(sprintf "%4X" i).Replace(" ", "0")

printf in fable_modules works well.

thautwarm avatar Dec 31 '21 22:12 thautwarm

FYI: This looks to be failing in Fable JS as well, please submit an issue to https://github.com/fable-compiler/Fable

dbrattli avatar Jan 01 '22 08:01 dbrattli