Home
last modified time | relevance | path

Searched refs:utf8 (Results 1 – 20 of 20) sorted by relevance

/aosp14/frameworks/base/libs/androidfw/
H A DUtil.cpp45 std::u16string Utf8ToUtf16(StringPiece utf8) { in Utf8ToUtf16() argument
47 utf8_to_utf16_length(reinterpret_cast<const uint8_t*>(utf8.data()), utf8.length()); in Utf8ToUtf16()
54 utf8_to_utf16(reinterpret_cast<const uint8_t*>(utf8.data()), utf8.length(), &*utf16.begin(), in Utf8ToUtf16()
65 std::string utf8; in Utf16ToUtf8() local
66 utf8.resize(utf8_length); in Utf16ToUtf8()
68 return utf8; in Utf16ToUtf8()
77 const size_t size = utf8.size(); in Utf8ToModifiedUtf8()
79 if (((uint8_t)utf8[i] >> 4) == 0xF) { in Utf8ToModifiedUtf8()
89 return std::string(utf8); in Utf8ToModifiedUtf8()
95 if (((uint8_t)utf8[i] >> 4) == 0xF) { in Utf8ToModifiedUtf8()
[all …]
H A DStringPool.cpp366 static bool EncodeString(const std::string& str, const bool utf8, BigBuffer* out, in EncodeString() argument
368 if (utf8) { in EncodeString()
381 EncodeString(kStringTooLarge, utf8, out, diag); in EncodeString()
407 EncodeString(kStringTooLarge, utf8, out, diag); in EncodeString()
431 bool StringPool::Flatten(BigBuffer* out, const StringPool& pool, bool utf8, IDiagnostics* diag) { in Flatten() argument
439 if (utf8) { in Flatten()
453 no_error = EncodeString(entry->value, utf8, out, diag) && no_error; in Flatten()
458 no_error = EncodeString(entry->value, utf8, out, diag) && no_error; in Flatten()
H A DApkAssets.cpp82 auto fd = unique_fd(base::utf8::open(overlay_path.c_str(), O_RDONLY | O_CLOEXEC)); in LoadOverlay()
H A DAssetsProvider.cpp37 base::unique_fd fd(base::utf8::open(path.c_str(), O_RDONLY | O_CLOEXEC)); in CreateAssetFromFile()
H A DResourceTypes.cpp245 auto fd = base::unique_fd(base::utf8::open(path, O_RDONLY|O_CLOEXEC)); in IsFabricatedOverlay()
/aosp14/frameworks/base/tools/aapt2/cmd/
H A DCompile_test.cpp66 ::android::base::utf8::unlink(path0_out.c_str()); in TEST_F()
68 ASSERT_EQ(::android::base::utf8::unlink(path0_out.c_str()), 0); in TEST_F()
70 ASSERT_EQ(::android::base::utf8::unlink(path0_out.c_str()), 0); in TEST_F()
74 ::android::base::utf8::unlink(path1_out.c_str()); in TEST_F()
76 ASSERT_EQ(::android::base::utf8::unlink(path1_out.c_str()), 0); in TEST_F()
82 ::android::base::utf8::unlink(path2_out.c_str()); in TEST_F()
91 ::android::base::utf8::unlink(path3_out.c_str()); in TEST_F()
99 ::android::base::utf8::unlink(path4_out.c_str()); in TEST_F()
107 ::android::base::utf8::unlink(path5_out.c_str()); in TEST_F()
120 ::android::base::utf8::unlink(kOutputFlata.c_str()); in TEST_F()
[all …]
H A DApkInfo.cpp82 int outfd = ::android::base::utf8::open(output_path_.c_str(), mode, 0666); in Action()
/aosp14/frameworks/base/libs/androidfw/include/androidfw/
H A DStringPiece.h44 std::string utf8; variable
45 utf8.resize(static_cast<size_t>(utf8_len));
46 utf16_to_utf8(str.data(), str.size(), utf8.data(), utf8_len + 1);
47 return out << utf8;
H A DUtil.h70 std::u16string Utf8ToUtf16(StringPiece utf8);
76 std::string Utf8ToModifiedUtf8(std::string_view utf8);
H A DStringPool.h216 static bool Flatten(BigBuffer* out, const StringPool& pool, bool utf8, IDiagnostics* diag);
/aosp14/frameworks/base/tools/aapt2/util/
H A DUtil.cpp341 std::u16string Utf8ToUtf16(StringPiece utf8) { in Utf8ToUtf16() argument
343 reinterpret_cast<const uint8_t*>(utf8.data()), utf8.length()); in Utf8ToUtf16()
350 utf8_to_utf16(reinterpret_cast<const uint8_t*>(utf8.data()), utf8.length(), in Utf8ToUtf16()
361 std::string utf8; in Utf16ToUtf8() local
362 utf8.resize(utf8_length); in Utf16ToUtf8()
363 utf16_to_utf8(utf16.data(), utf16.length(), &*utf8.begin(), utf8_length + 1); in Utf16ToUtf8()
364 return utf8; in Utf16ToUtf8()
H A DFiles.cpp133 int result = ::android::base::utf8::mkdir(parent_path.c_str(), mode); in mkdirs()
139 return ::android::base::utf8::mkdir(path.c_str(), mode) == 0 || errno == EEXIST; in mkdirs()
213 unique_fd fd(TEMP_FAILURE_RETRY(::android::base::utf8::open(path.c_str(), flags))); in MmapPath()
/aosp14/system/core/libutils/
H A DUnicode_test.cpp306 static char utf8[] = "\xc4\x00\x00\x00"; in TEST_F() local
307 ASSERT_DEATH(utf8_to_utf16_length((uint8_t *) utf8, strlen(utf8), in TEST_F()
/aosp14/frameworks/base/tools/powermodel/src/com/android/powermodel/
H A DCsvParser.java59 final Charset utf8 = StandardCharsets.UTF_8; in parse() local
151 + new String(buf, 0, 20, utf8) + "..."); in parse()
/aosp14/frameworks/base/tools/aapt2/io/
H A DFileStream.cpp43 fd_.reset(TEMP_FAILURE_RETRY(::android::base::utf8::open(path.c_str(), mode))); in FileInputStream()
114 owned_fd_.reset(TEMP_FAILURE_RETRY(::android::base::utf8::open(path.c_str(), mode, 0666))); in FileOutputStream()
/aosp14/frameworks/base/tools/aapt2/format/
H A DArchive.cpp65 file_ = {::android::base::utf8::fopen(full_path.c_str(), "wb"), fclose}; in StartEntry()
136 file_ = {::android::base::utf8::fopen(path.data(), "w+b"), fclose}; in Open()
/aosp14/frameworks/base/tools/aapt/
H A DStringPool.h85 explicit StringPool(bool utf8 = false);
H A DStringPool.cpp118 StringPool::StringPool(bool utf8) : in StringPool() argument
119 mUTF8(utf8), mValues(-1) in StringPool()
/aosp14/frameworks/base/tools/aapt2/trace/
H A DTraceBuffer.cpp74 FILE* f = android::base::utf8::fopen(s.str().c_str(), "a"); in Flush()
/aosp14/frameworks/base/tools/aapt2/test/
H A DFixture.cpp65 android::base::utf8::unlink(full_path.c_str()); in ClearDirectory()