Open
Description
Dafny version
4.7.0 (master as of 29 Aug, except for Rust which is latest feat_rust)
Code to produce this issue
module foo {
method bar() {
var decoded := "\uD835\uDFC1";
var expected_redecoded := "𝟁";
print decoded, "\n", expected_redecoded, "\n";
print |decoded|, "\n", |expected_redecoded|, "\n";
assert decoded == expected_redecoded;
expect "\uD835\uDFC1" == "𝟁";
}
method Main() {
print "Hello World!\n";
bar();
}
}
Command to run and resulting output
This command succeeds as expected :
dafny run -t cs --unicode-char:false foo.dfy
js also works correctly.
With a target of python or rust, we get weird runtime errors.
With java, it fails to run, for reasons that don't seem string related.
go mostly works, but prints `��` instead of `𝟁`
With cpp a compiler error "invalid universal character"
What happened?
I would expect all languages to behave as cs.
What type of operating system are you experiencing the problem on?
Mac