Biohazrd
Biohazrd copied to clipboard
Add support for `char32_t` and `wchar_t` on Itanium platforms
char32_t
represents UTF-32 codepoints. They aren't supported yet purely out of lack of need and unclear best translation.
How these might translate to C# is somewhat unclear. Older methods such as Char.ConvertFromUtf32
use int
for UTF32 codepoints.
In theory System.Text.Rune
might be a good choice here, but it doesn't allow surrogates. I'm unsure if there's a legitimate reason for codepoints from the surrogate range to appear in UTF-32. However, we would be allows C++ to make invalid runes since the Rune
constructor protects against surrogates.
More research needs to be done to determine if a reasonable ideal default translation can be supported in Biohazrd. Until then it most likely makes more sense for people to provide their own purpose-built translation. (If you make one, please comment on how you did it and how it worked out for you!)
This also applies to wchar_t
on Itanium (IE: Linux)