In an new c++ project, I referred UE4Editor-Engine.lib and its .h files.
When I try to create a FString, its value is strange (Please refer the attached screenshot.
What I noticed is, it is executing the below method in GenericPlatform.h
Any clue why it is happening like this?
I understood that this is not the approach to host the engine but for technical understanding purpose, why I am getting strange value?
template <typename SourceEncoding, typename DestEncoding>
static FORCEINLINE typename TEnableIf<
// This overload should be called when SourceEncoding and DestEncoding are ‘compatible’, i.e. they’re the same type or equivalent (e.g. like UCS2CHAR and WIDECHAR are on Windows).
>::Type Convert(DestEncoding* Dest, int32 DestSize, const SourceEncoding* Src, int32 SrcSize, DestEncoding BogusChar = (DestEncoding)’?’)
if (DestSize < SrcSize)
return (DestEncoding*)Memcpy(Dest, Src, SrcSize * sizeof(SourceEncoding)) + SrcSize; }