When i’m using ReScript@9 to processing Chinese characters on my Windows computer, some compiler bugs shows.
This is raw code ↓
let a = "这是一段中文"
let fn = t=>j`$t现在通过函数返回`
let fn_u = (. t)=>j`$t现在通过Uncurried函数返回`
let r1 = fn(a)
let r1_1 = a->fn
let r2 = fn_u(. a)
let r3 = "这里也是一些文字"->fn
Js.log(r1)
Js.log(r1_1)
Js.log(r2)
And this is compiled code ↓
We can clearly find the chinese character are not compilered correctly.
Honestly, I’m not sure if it’s the exception or the general case, and i found the docs shows ReScript have proper unicode handling.
This is a minimal reproduction case, only shows on Windows.
Please help me, thanks a lot !