Keil Logo

ARMCLANG: Fatal Error: UTF-16 (LE) Byte Order Mark Detected


Information in this knowledgebase article applies to:

  • Arm Compiler 6

SYMPTOM

After adding a source file, for example, "Blinky.c", the compiler returns the following error:

fatal error: UTF-16 (LE) byte order mark detected 'Blinky.c' but encoding is not supported

CAUSE

The byte order mark (BOM) at the start of the UTF-16 file causes the error. UTF-16 is not supported by Arm Compiler 6.

RESOLUTION

Using a third-party editor, convert the encoding of the file to a supported encoding, like UTF-8. For example, in Notepad++, go to Encoding => "Convert to UTF-8". Then re-save the file.

STATUS

The earlier compiler, Arm Compiler 5, supported UTF-16. As of this writing (April 19th, 2017), support for UTF-16 is not planned for Arm Compiler 6.

Note: The Arm C library does support the use of UCS-2, a subset of UTF-16.
For example, the library supports wide character output from swprintf().

MORE INFORMATION

Last Reviewed: Friday, January 8, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.