Lines Matching refs:IsStringUTF8
325 TEST(StringUtilTest, IsStringUTF8) { in TEST() argument
326 EXPECT_TRUE(IsStringUTF8("abc")); in TEST()
327 EXPECT_TRUE(IsStringUTF8("\xc2\x81")); in TEST()
328 EXPECT_TRUE(IsStringUTF8("\xe1\x80\xbf")); in TEST()
329 EXPECT_TRUE(IsStringUTF8("\xf1\x80\xa0\xbf")); in TEST()
330 EXPECT_TRUE(IsStringUTF8("a\xc2\x81\xe1\x80\xbf\xf1\x80\xa0\xbf")); in TEST()
331 EXPECT_TRUE(IsStringUTF8("\xef\xbb\xbf" "abc")); // UTF-8 BOM in TEST()
334 EXPECT_FALSE(IsStringUTF8("\xed\xa0\x80\xed\xbf\xbf")); in TEST()
335 EXPECT_FALSE(IsStringUTF8("\xed\xa0\x8f")); in TEST()
336 EXPECT_FALSE(IsStringUTF8("\xed\xbf\xbf")); in TEST()
339 EXPECT_FALSE(IsStringUTF8("\xc0\x80")); // U+0000 in TEST()
340 EXPECT_FALSE(IsStringUTF8("\xc1\x80\xc1\x81")); // "AB" in TEST()
341 EXPECT_FALSE(IsStringUTF8("\xe0\x80\x80")); // U+0000 in TEST()
342 EXPECT_FALSE(IsStringUTF8("\xe0\x82\x80")); // U+0080 in TEST()
343 EXPECT_FALSE(IsStringUTF8("\xe0\x9f\xbf")); // U+07ff in TEST()
344 EXPECT_FALSE(IsStringUTF8("\xf0\x80\x80\x8D")); // U+000D in TEST()
345 EXPECT_FALSE(IsStringUTF8("\xf0\x80\x82\x91")); // U+0091 in TEST()
346 EXPECT_FALSE(IsStringUTF8("\xf0\x80\xa0\x80")); // U+0800 in TEST()
347 EXPECT_FALSE(IsStringUTF8("\xf0\x8f\xbb\xbf")); // U+FEFF (BOM) in TEST()
348 EXPECT_FALSE(IsStringUTF8("\xf8\x80\x80\x80\xbf")); // U+003F in TEST()
349 EXPECT_FALSE(IsStringUTF8("\xfc\x80\x80\x80\xa0\xa5")); // U+00A5 in TEST()
352 EXPECT_FALSE(IsStringUTF8("\xf4\x90\x80\x80")); // U+110000 in TEST()
353 EXPECT_FALSE(IsStringUTF8("\xf8\xa0\xbf\x80\xbf")); // 5 bytes in TEST()
354 EXPECT_FALSE(IsStringUTF8("\xfc\x9c\xbf\x80\xbf\x80")); // 6 bytes in TEST()
357 EXPECT_FALSE(IsStringUTF8("\xfe\xff")); in TEST()
358 EXPECT_FALSE(IsStringUTF8("\xff\xfe")); in TEST()
359 EXPECT_FALSE(IsStringUTF8(std::string("\x00\x00\xfe\xff", 4))); in TEST()
360 EXPECT_FALSE(IsStringUTF8("\xff\xfe\x00\x00")); in TEST()
363 EXPECT_FALSE(IsStringUTF8("\xef\xbf\xbe")); // U+FFFE) in TEST()
364 EXPECT_FALSE(IsStringUTF8("\xf0\x8f\xbf\xbe")); // U+1FFFE in TEST()
365 EXPECT_FALSE(IsStringUTF8("\xf3\xbf\xbf\xbf")); // U+10FFFF in TEST()
366 EXPECT_FALSE(IsStringUTF8("\xef\xb7\x90")); // U+FDD0 in TEST()
367 EXPECT_FALSE(IsStringUTF8("\xef\xb7\xaf")); // U+FDEF in TEST()
371 EXPECT_FALSE(IsStringUTF8("caf\xe9")); // cafe with U+00E9 in ISO-8859-1 in TEST()
372 EXPECT_FALSE(IsStringUTF8("\xb0\xa1\xb0\xa2")); // U+AC00, U+AC001 in EUC-KR in TEST()
373 EXPECT_FALSE(IsStringUTF8("\xa7\x41\xa6\x6e")); // U+4F60 U+597D in Big5 in TEST()
375 EXPECT_FALSE(IsStringUTF8("\x93" "abc\x94")); in TEST()
377 EXPECT_FALSE(IsStringUTF8("\xd9\xee\xe4\xee")); in TEST()
379 EXPECT_FALSE(IsStringUTF8("\xe3\xe5\xe9\xdC")); in TEST()
386 EXPECT_TRUE(IsStringUTF8( in TEST()
388 EXPECT_FALSE(IsStringUTF8("embedded\xc0\x80U+0000")); in TEST()