UTF 16 error

Hello

I’ve been trying to package my project to android (ETC1) and I get the following errors

 UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: C:/Users//Documents/Unreal Projects/ProyectoAlfaBackup/Intermediate/Plugins/Android_ETC1/NativizedAssets/Intermediate/Build/Android/UE4/Development/NativizedAssets/Module.NativizedAssets.3_of_5.cpp(6,10) :  fatal error: UTF-16 (LE) byte order mark detected in 'C:\Users\\Documents\Unreal Proj
  UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: 1 error generated.
  UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: C:/Users//Documents/Unreal Projects/ProyectoAlfaBackup/Intermediate/Plugins/Android_ETC1/NativizedAssets/Intermediate/Build/Android/UE4/Development/NativizedAssets/Module.NativizedAssets.gen.3_of_5.cpp(6,10) :  fatal error: UTF-16 (LE) byte order mark detected in 'C:\Users\\Documents\Unreal 
  UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: C:/Users//Documents/Unreal Projects/ProyectoAlfaBackup/Intermediate/Plugins/Android_ETC1/NativizedAssets/Intermediate/Build/Android/UE4/Development/NativizedAssets/Module.NativizedAssets.gen.2_of_5.cpp(7,10) :  fatal error: UTF-16 (LE) byte order mark detected in 'C:\Users\\Documents\Unreal 
  UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: 1 error generated.
  UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: 1 error generated.
  UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: C:/Users//Documents/Unreal Projects/ProyectoAlfaBackup/Intermediate/Plugins/Android_ETC1/NativizedAssets/Intermediate/Build/Android/UE4/Development/NativizedAssets/Module.NativizedAssets.gen.1_of_5.cpp(5,10) :  fatal error: UTF-16 (LE) byte order mark detected in 'C:\Users\\Documents\Unreal 
  UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: C:/Users//Documents/Unreal Projects/ProyectoAlfaBackup/Intermediate/Plugins/Android_ETC1/NativizedAssets/Intermediate/Build/Android/UE4/Development/NativizedAssets/Module.NativizedAssets.gen.4_of_5.cpp(8,10) :  fatal error: UTF-16 (LE) byte order mark detected in 'C:\Users\\Documents\Unreal 
  UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: 1 error generated.
  UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: 1 error generated.
  UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: C:\Users\\Documents\Unreal Projects\ProyectoAlfaBackup\Intermediate\Plugins\Android_ETC1\NativizedAssets\Binaries\Android\UE4-NativizedAssets-armv7-es2.a
  UATHelper: Packaging (Android (ETC1)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): C:\Program Files\Epic Games\UE_4.17\Engine\Binaries\DotNET\UnrealBuildTool.exe ProyectoAlfaBackup Android Development -Project="C:\Users\\Documents\Unreal Projects\ProyectoA
  PackagingResults: Error: Unknown Error

I looked up the UTF-16 problem and it seems like it has to do with the encoding of those cpp files. However, I can’t find any option to change the encoding of the automatically generated files (the build tool is set to UTF 8 btw), so I’m kinda lost at this point.

Any help is appreciated

I have the same issue: https://answers.unrealengine.com/questions/718610/418-linux-build-errors-with-clang10-bp-nativizatio.html

Hi there,

The presence of non-ASCII characters in a Blueprint function graph name will currently lead to this issue in 4.18.0, with Blueprint nativization enabled for certain platform targets where the compiler toolchain does not support UTF-16 encoded source files.

The suggested workaround for now is to avoid using non-ASCII characters in the Blueprint function name if possible until this can be addressed. This issue should eventually become available for tracking here: Unreal Engine Issues and Bug Tracker (UE-51910).

Hope this helps!

While that could be the root of the issue, but I checked - all my function/variables/etc names are within standard ASCII characters (latin keyboard).

Agreed, however in that post I noticed that for the “GetТехт_Attributes” function it appears the ‘Техт’ substring consists of non-ASCII characters.

thanks, in some parts my code had the letter ñ

I’m having the same issue in 4.19, in my project.cpp file. However there are no non-ASCII characters in the file or the name of the file…

I had Cyrillic ‘C’ in the name of the icon files instead of the Latin ‘C’. They look the same, but they are 2 different symbols. Avoid file names and function in bluprints other than English.