how to get fstring size?
I encountered a problem sending the string
this's my code:
Socket->Send((uint8*)TCHAR_TO_UTF8(*StringValue), StringValue.Len(), SocketSent);
I use FString.Len() to get the length of FString
if "StringValue" is English , this's normal
but if "StringValue" it's Chinese , this's wrong , it's length is too short
FString is just an array of TCHARs. FString::Len() will return the size of that array. If you see more characters than FString::Len() is reporting then most likely there are two (or more) Chinese characters within the same TCHAR in the FString array.
answered Dec 31 '17 at 02:43 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here