Re:The complete guide to working with strings in modern Java...
by esprehn on Tuesday April 13, 2021 @02:16PM
(#26796661)
It's latin1. The same is true of DOM strings in Chromium, like attributes, blocks of text, and inline scripts.
Webkit and the JDK implement the same string optimization, while .NET unfortunately doesn't: https://github.com/dotnet/runtime/issues/6612
Re:The complete guide to working with strings in modern Java...
by faitswulff on Tuesday April 13, 2021 @02:01PM
(#26796444)
Regarding [^2], is it code page 437 by any chance? https://en.m.wikipedia.org/wiki/Code_page_437
Re:The complete guide to working with strings in modern Java...
by esprehn on Tuesday April 13, 2021 @02:17PM
(#26796678)
It's Latin1 which I think is code page 850:
https://en.m.wikipedia.org/wiki/Code_page_850
Re:The complete guide to working with strings in modern Java...
by davethedevguy on Tuesday April 13, 2021 @01:59PM
(#26796424)
I didn't know that!
I'll add something to the post.
Thank you!
[^1]: It actually depends on how that string was made, if internally it still references the parent string then slicing it up into lines won't save you any memory. I'm referring to "flattened" strings.
[^2]: I don't remember what the exact character set is, I think it's not exactly ASCII but close enough.