Genvid Forum

UE4 Module Patch for Multibyte string (Japanese Integration)


#1

It has come to our attention that there is an issue with the UE4 GenvidStreamer.cpp and GenvidStreams.cpp.

UGenvidStreamer::CompressString(const TCHAR* str, int stringLen, TArray<uint8>& compressed) copies string data from FMemory::Memcpy() with stringLen for memory size, whereas stringLen comes from FString::Len(str).

With multi-byte strings, FString::Len(str) and actual byte size of TCHAR_TO_UTF8(str) might be different if FString::Len(str) returns the number of characters (ex. returns 1 for 1 kanji) whereas 1 kanji can consist of 2 or more bytes. This results in potentially preventing correct string data from being sent.

-Solution:-

A patch has been created to fix this issue until the next SDK version release.
https://drive.google.com/open?id=13AvJMgEIGW8s3zr8LWAYPa_QhNie3-0a

  1. Download the .zip at the following location and replace the “Common” folder within the UE4 sample found in the Genvid source location.
  2. Recompile your project

The Genvid Team