On 03/10/13 12:50, leef huo wrote:
I want to print "hello world, 世界"(Chinese)to the console, but the result is garbled(messy code), the following code where the problem is?
fn main() {
let s=~"hello,世界";
println(s);
}
Should output:hello,世界

but it print " hello,涓栫晫 " to the console.


Is the file saved as UTF-8, and is your console using UTF-8? Rust essentially only supports UTF-8 for strings at the moment.

Huon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to