UCS-2 support is shipped with every modern x86 firmware. UEFI system partitions use it for VFAT name encoding.
> UTF-16 length is only useful if you are moving UTF-16 [...] Remember to pass on your condolences and look forward to a day when we don't do that any more.
Java/the JVM says hi!
Arguably, "how many bytes does this string occupy in memory/on disk (e.g. in class files)" is a pretty useful thing to be able to ask.
Re:It’s Not Wrong that “ ”.length == 7
by tialaramex on Friday June 02, 2023 @11:36AM
(#36166571)
> Arguably, "how many bytes does this string occupy in memory/on disk (e.g. in class files)" is a pretty useful thing to be able to ask.
Sure. On disk those strings are (modified) UTF-8 of course, is that what you meant ?
UTF-16 length is only useful if you are moving UTF-16, perhaps for interop with other software that chose UTF-16. Remember to pass on your condolences and look forward to a day when we don't do that any more.