←back to thread

238 points GalaxySnail | 1 comments | | HN request time: 0.199s | source
Show context
Macha ◴[] No.40168944[source]
> And many other popular programming languages, including Node.js, Go, Rust, and Java uses UTF-8 by default.

Oh, I missed Java moving from UTF-16 to UTF-8.

replies(3): >>40169012 #>>40169499 #>>40169530 #
rootext ◴[] No.40169499[source]
It seems you are mixing two things: inner string representation and read/write encoding. Java has never used UTF-16 as default for the second.
replies(2): >>40170808 #>>40176650 #
1. Dwedit ◴[] No.40176650[source]
Or possibly confusing it with JavaScript, which treats strings as sequences of UTF-16 characters?