Hacker News new | ask | show | jobs
by masklinn 1485 days ago
No, the internal storage is still UTF-16.

What the "UTF-8 literals" feature is really about the conversion of strings to byte[] (and similar).

And more specifically the static initialisation of byte[]: initialising a byte[] from a string literal will store the UTF8 encoding of the literal as a bytes array and can be performed from static data (a bytes constant in the binary), before that you had to write the "new byte[]" with individual integral byte value by hand e.g.

    byte[] thing = new byte[] { 0x77, 0x6f, 0x72, 0x6c, 0x64 };
can now be written

    byte[] thing = "world";