23 #ifndef PAGESPEED_KERNEL_BASE_CHARSET_UTIL_H_
24 #define PAGESPEED_KERNEL_BASE_CHARSET_UTIL_H_
28 namespace net_instaweb {
32 const char kUtf16BigEndianCharset[] =
"utf-16be";
33 const char kUtf16LittleEndianCharset[] =
"utf-16le";
34 const char kUtf32BigEndianCharset[] =
"utf-32be";
35 const char kUtf32LittleEndianCharset[] =
"utf-32le";
39 const char kUtf16BigEndianBom[] =
"\xFE\xFF";
40 const char kUtf16LittleEndianBom[] =
"\xFF\xFE";
41 const char kUtf32BigEndianBom[] =
"\x00\x00\xFE\xFF";
42 const char kUtf32LittleEndianBom[] =
"\xFF\xFE\x00\x00";
const StringPiece GetCharsetForBom(const StringPiece contents)
bool StripUtf8Bom(StringPiece *contents)
const char kUtf8Bom[]
The Byte-Order-Mark (BOM) for the various UTF encodings.
Definition: charset_util.h:38
const char kUtf8Charset[]
The charsets we understand. Currently only those that have BOMs below.
Definition: charset_util.h:31