StringToBytes/BytesToString broken for some characters

Haya,

  1. Not able to test on 4.12.5, but looking at the code in UnrealString.h, I can see that it hasn’t been fixed yet.

2/3. If you pop this code into an exec function you should be able to see what I’m talking about:

    FString inString(TEXT("TestString™"));
    uint32 size = inString.Len();
    TArray<uint8> data;
    data.AddUninitialized(size);
    StringToBytes(inString, data.GetData(), size);

    FString outString = BytesToString(data.GetData(), size);

    ensureMsgf(inString == outString, TEXT("In String: \"%s\" Out String: \"%s\""), *inString, *outString);

inString and outString should be the same string, but inString is “TestString™” and outString is “TestString”" (note extra quotes).