4 ms·
Are you sure? That will result in a conversion every time a string is passed to the kernel. Windows can handle utf-8 but it is not the native character set for
by jdsully 7y ago
Are you sure? That will result in a conversion every time a string is passed to the kernel.
Windows can handle utf-8 but it is not the native character set for the platform.
- JdeBP 7y agoThere's a conversion in every ...A() function. Conversion between UTF-8 and WTF-16 is just more of the same, but without codepage lookup tables. (-:
- mark-r 7y agoThey probably still do a codepage lookup just for consistency.
- Shebanator 7y agoWTF-16? I like it...
- ekimekim 7y agoWTF-8 and WTF-16 are a thing: https://simonsapin.github.io/wtf-8/ https://simonsapin.github.io/wtf-8/ Basically WTF-16 is any sequence of 16-bit integers, and is thus a superset of UTF-16 (because UTF-16 doesn't allow certain combinations of integers, mainly surrogate code points that exist outside of surrogate pairs). Then WTF-8 is what you get if you naively transform invalid UTF-16 into UTF-8. It is a superset of UTF-8. This is very useful when dealing with applications like Java and Javascript that treat strings as sequences of 16-bit code points, even though not all such strings are valid UTF-16.
- masklinn 7y ago> Basically WTF-16 is any sequence of 16-bit integers, and is thus a superset of UTF-16 (because UTF-16 doesn't allow certain combinations of integers, mainly surrogate code points that exist outside of surrogate pairs). If WTF-16 is the ability in potentia to store and return invalid UTF-16 without signalling errors, I don't know that there's any actual UTF-16 system out there to the possible exception of… HFS+ maybe?.
- loeg 7y agoAPFS continues to normalize codepoints as well.