1
2>    --------------------Project: Default-------------------------------------------
2>    MyProjectCharacter.cpp (0:01.59 at +0:00)
2>    EXEC : warning : unable to get MBCS string (input text '??: ?? ??:%s%s
2>    ', library C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\1042\clui.dll)
2>    UE4Editor-MyProject-0002.dll (0:00.68 at +0:01)
2>       Creating library C:\Users\grand\GameDev\MyProject\Intermediate\Build\Win64\UE4Editor\Development\MyProject\UE4Editor-MyProject-0002.suppressed.lib and object C:\Users\grand\GameDev\MyProject\Intermediate\Build\Win64\UE4Editor\Development\MyProject\UE4Editor-MyProject-0002.suppressed.exp
2>    UE4Editor-MyProject-0002.lib (0:00.07 at +0:02)
2>       Creating library C:\Users\grand\GameDev\MyProject\Intermediate\Build\Win64\UE4Editor\Development\MyProject\UE4Editor-MyProject-0002.lib and object C:\Users\grand\GameDev\MyProject\Intermediate\Build\Win64\UE4Editor\Development\MyProject\UE4Editor-MyProject-0002.exp
2>    MyProjectEditor.target (0:00.17 at +0:02)
2>    ---------------------- Done ----------------------

There's no problem with compiling, but this warning keeps showing up on the output window. Is this just a trivial thing that has nothing to do with the game I'm making? or can it make some problems later? I googled this warning, but nothing I can find. What I did to solve it is downgrading engine version to 4.24, reinstalling VS and UE4, installing MSVC v141, v140(verion 2017, 2015).

Qwer Asdf
  • 11
  • 1
  • 4
  • 2
    goto VS Build options and select more verbose output compilation to get more details. –  Jun 19 '20 at 19:33
  • I've added more details. Verbosity setting was diagonostic. – Qwer Asdf Jun 19 '20 at 20:33
  • 2
    can you add a piece of code from your file `MyProjectCharacter.cpp` that is referencing a string ? It seems that your warning is linked to string conversion with your default language. What is your host Windows language ? –  Jun 20 '20 at 07:28
  • If scroll up in the output window, it should show you where errors are. Most likely you have created a string literal like `"str"` that needs to be wrapped up like : `TEXT("str")`. – George Jun 20 '20 at 08:23
  • My language is korean. – Qwer Asdf Jun 20 '20 at 11:46
  • `MyProjectCharacter.cpp` is the default file created by UE4 initiallly, and I just added `int32 Test = 0;` in the contructor. It seems not related to the code itself, I mean what I coded. Because, when I add `inline void TestFunction() {}` in the MyProject.h, same things show up on the output window, except that `MyProjectCharacter.cpp` is changed to `MyProject.cpp`. It still does even when I delete other cpp or header files except `MyProject.h` and `MyProject.cpp`, leaving these as UE4 first created. So whenever I make any change in any file, the warning shows up. – – Qwer Asdf Jun 20 '20 at 12:14

2 Answers2

1

This is sample from UE4 Internal String Representation

UE4 Internal String Representation : All strings in Unreal Engine 4 (UE4) are stored in memory in UTF-16 format as FStrings or TCHAR arrays. Most code assumes 2 bytes is one codepoint so only the Basic Multilingual Plane (BMP) is supported so Unreal's internal encoding is more correctly described as UCS-2. Strings are stored in the endian-ness appropriate for the current platform. When serializing to packages to/from disk or during networking, strings with all TCHAR characters less than 0xff are stored as a series of 8-bit bytes, and otherwise as 2-byte UTF-16 strings. The serialization code can deal with any endian conversion as necessary. When Unreal loads an external text file (for example reading a .INT file at runtime) it is almost always done with the appLoadFileToString() function found in UnMisc.cpp. The main work occurs in the appBufferToString() function. This function recognizes the Unicode byte-order-mark (BOM) in a UTF-16 file and if present, will load the file as UTF-16 in either endian-ness. What happens when the BOM is not present depends on the platform. On Windows, it will attempt to convert the text to UTF-16 using the default Windows MBCS encoding (eg Windows-1252 for US English and Western Europe, CP949 for Korean and CP932 for Japanese) and uses MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS...). This was added around the July 2009 QA build. If this conversion fails on platforms other than Windows, it will just read each byte and pad it to 16-bits to make an array of TCHARs. Note that there is no code to detect or decode UTF-8 encoded text files loaded with appLoadFileToString().

It seems your program faces a language unicode warning conversion. If your read or converted string is correct with your language settings, then you can ignore this Warning. But try some conversion with all your language characters to checks if all are well converted. Otherwise, your can force language conversion using :

string utf8String = Encoding.UTF8.GetString(Encoding.ASCII.GetBytes(text));

Take also a look at this SO question : How to convert Unicode string to a TCHAR system with Unreal project

0

Wow it was because of IncreBuild. I deleted it, and the warning doesn't come out anymore.

Qwer Asdf
  • 11
  • 1
  • 4
  • 2
    , glad to hear that you solve your issue, but this doesn't explain why you had this compile error. –  Jun 25 '20 at 08:34