https://learn.microsoft.com/en-us/dotnet/api/system.text.utf32encoding.getmaxcharcount?view=net-10.0
UTF32Encoding.GetMaxCharCount(Int32) Method (System.Text) | Microsoft Learn
Calculates the maximum number of characters produced by decoding the specified number of bytes.
methodsystemtextmicrosoftlearn