3 ms·
Do you have a source for this? AFAIK the .NET Framework CLR and CoreCLR both still store strings internally as UTF-16.
by nathanaldensr 7y ago
Do you have a source for this? AFAIK the .NET Framework CLR and CoreCLR both still store strings internally as UTF-16.
- ChrisSD 7y agoThe closest I could find to a recommendation for UTF-8 is in UWP design guidelines: https://docs.microsoft.com/en-us/windows/uwp/design/globalizing/use-utf8-code-page https://docs.microsoft.com/en-us/windows/uwp/design/globaliz... However it's not quite unequivocal. Windows still uses UTF-16 in the kernel (or actually an array of 16bit integers, but UTF-16 is a very strong convention). The code page will often allow the Win32 API to perform the conversion back and forth instead of your application doing it.
- mormegil 7y agoAFAICT, it's not only "internal representation". .NET strings are defined as a sequence of UTF-16 units, including the definition of the Char type representing a single UTF-16 code unit. I can't imagine how such a change could be implemented (other than changing the internal representation but converting on all accesses which would be nonsense, I think).
- leosarev 7y agoCurrent plan is: https://github.com/dotnet/corefxlab/issues/2350 https://github.com/dotnet/corefxlab/issues/2350
- leosarev 7y agoCoreCLR actively discussing introducing Utf8String type. https://github.com/dotnet/corefxlab/issues/2350 https://github.com/dotnet/corefxlab/issues/2350