RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
WideStrUtils.DetectUTF8Encoding Function

Detects the encoding of a given WideString.

Pascal
function DetectUTF8Encoding(const s: RawByteString): TEncodeType;
C++
TEncodeType DetectUTF8Encoding(const RawByteString s);

Call DetectUTF8Encoding to detect if a given WideString is UTF-8, ASCII, or ANSI encoded.

Note: DetectUTF8Encoding does not guarantee that the detected encoding is correct. DetectUTF8Encoding attempts to identify the encoding by checking the characters present in the string.
 

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