Home | History | Annotate | Download | only in base

Lines Matching refs:utf8

17 #include "android-base/utf8.h"
75 static std::wstring UTF8ToWide(const std::string& utf8) {
77 EXPECT_TRUE(UTF8ToWide(utf8, &utf16));
82 std::string utf8;
83 EXPECT_TRUE(WideToUTF8(utf16, &utf8));
84 return utf8;
123 std::ostringstream utf8;
124 utf8 << WideToUTF8(kConvertRoundtripCases[i]);
126 wide << UTF8ToWide(utf8.str());
143 const char* utf8;
174 const bool success = UTF8ToWide(convert_cases[i].utf8,
175 strlen(convert_cases[i].utf8),
208 const char* utf8;
251 std::string expected(convert_cases[i].utf8);
264 const char* utf8;
287 std::string expected(convert_cases[i].utf8);
347 static std::wstring SysUTF8ToWide(const std::string& utf8) {
348 return UTF8ToWide(utf8);
417 std::string utf8 = "c:\\mypath\\myfile.txt";
420 EXPECT_TRUE(UTF8PathToWindowsLongPath(utf8.c_str(), &wide));
426 std::string utf8 = "c:\\mypath";
427 while (utf8.length() < 300 /* MAX_PATH is 260 */) {
428 utf8 += "\\mypathsegment";
432 EXPECT_TRUE(UTF8PathToWindowsLongPath(utf8.c_str(), &wide));
439 std::string utf8 = "c:/mypath";
440 while (utf8.length() < 300 /* MAX_PATH is 260 */) {
441 utf8 += "/mypathsegment";
445 EXPECT_TRUE(UTF8PathToWindowsLongPath(utf8.c_str(), &wide));
451 namespace utf8 {
457 std::string utf8 = td.path;
458 while (utf8.length() < 300 /* MAX_PATH is 260 */) {
459 utf8 += "\\mypathsegment";
460 EXPECT_EQ(0, mkdir(utf8.c_str(), 0));
464 utf8 += "\\test-file.bin";
467 android::base::unique_fd fd(open(utf8.c_str(), flags, mode));
475 FILE* file = fopen(utf8.c_str(), "rb");
483 EXPECT_EQ(0, unlink(utf8.c_str()));
486 } // namespace utf8