RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
WideStrUtils.sUTF8BOMString Constant

Represents the UTF-8 byte-order mark.

Pascal
sUTF8BOMString: array[1..3] of AnsiChar = (AnsiChar(#$EF), AnsiChar(#$BB), AnsiChar(#$BF));
C++
array[1..3] of AnsiChar sUTF8BOMString = (AnsiChar(#$EF), AnsiChar(#$BB), AnsiChar(#$BF));

sUTF8BOMString is a 3 byte array that represents the UTF-8 byte-order mark. The byte-order mark is used to detect if a given text is UTF-8 encoded.  

To manually check if a given text is UTF-8 encoded, check whether the first 3 bytes match the ones defined by sUTF8BOMString constant. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!