/system/core/base/include/android-base/ |
utf8.h | 23 // Bring in prototypes for standard APIs so that we can import them into the utf8 namespace. 37 bool WideToUTF8(const wchar_t* utf16, const size_t size, std::string* utf8); 41 bool WideToUTF8(const wchar_t* utf16, std::string* utf8); 45 bool WideToUTF8(const std::wstring& utf16, std::string* utf8); 49 bool UTF8ToWide(const char* utf8, const size_t size, std::wstring* utf16); 53 bool UTF8ToWide(const char* utf8, std::wstring* utf16); 57 bool UTF8ToWide(const std::string& utf8, std::wstring* utf16); 70 bool UTF8PathToWindowsLongPath(const char* utf8, std::wstring* utf16); 73 // The functions in the utf8 namespace take UTF-8 strings. For Windows, these 80 // using namespace android::base::utf8; 88 namespace utf8 { namespace in namespace:android::base [all...] |
/system/core/base/ |
utf8.cpp | 19 #include "android-base/utf8.h" 44 bool WideToUTF8(const wchar_t* utf16, const size_t size, std::string* utf8) { 45 utf8->clear(); 71 utf8->resize(chars_required); 74 &(*utf8)[0], chars_required, NULL, 80 utf8->clear(); 87 bool WideToUTF8(const wchar_t* utf16, std::string* utf8) { 89 return WideToUTF8(utf16, wcslen(utf16), utf8); 92 bool WideToUTF8(const std::wstring& utf16, std::string* utf8) { 95 return WideToUTF8(utf16.c_str(), utf16.length(), utf8); 182 namespace utf8 { namespace in namespace:android::base [all...] |
utf8_test.cpp | 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; local 83 EXPECT_TRUE(WideToUTF8(utf16, &utf8)); 84 return utf8; 123 std::ostringstream utf8; local 124 utf8 << WideToUTF8(kConvertRoundtripCases[i]); 126 wide << UTF8ToWide(utf8.str()); 143 const char* utf8; member in struct:android::base::UTF8ToWideCase 208 const char* utf8; member in struct:android::base::WideToUTF8Case 264 const char* utf8; member in struct:android::base::WideToUTF8Case 417 std::string utf8 = "c:\\\\mypath\\\\myfile.txt"; local 426 std::string utf8 = "c:\\\\mypath"; local 439 std::string utf8 = "c:\/mypath"; local 451 namespace utf8 { namespace in namespace:android::base 457 std::string utf8 = td.path; local [all...] |
/frameworks/base/libs/androidfw/ |
Util.cpp | 44 std::u16string Utf8ToUtf16(const StringPiece& utf8) { 46 utf8_to_utf16_length(reinterpret_cast<const uint8_t*>(utf8.data()), utf8.length()); 53 utf8_to_utf16(reinterpret_cast<const uint8_t*>(utf8.data()), utf8.length(), &*utf16.begin(), 64 std::string utf8; local 65 utf8.resize(utf8_length); 66 utf16_to_utf8(utf16.data(), utf16.length(), &*utf8.begin(), utf8_length + 1); 67 return utf8;
|
/prebuilts/go/darwin-x86/src/unicode/utf8/ |
example_test.go | 9 "unicode/utf8" 16 r, size := utf8.DecodeLastRune(b) 37 r, size := utf8.DecodeLastRuneInString(str) 59 r, size := utf8.DecodeRune(b) 80 r, size := utf8.DecodeRuneInString(str) 101 n := utf8.EncodeRune(buf, r) 112 fmt.Println(utf8.FullRune(buf)) 113 fmt.Println(utf8.FullRune(buf[:2])) 121 fmt.Println(utf8.FullRuneInString(str)) 122 fmt.Println(utf8.FullRuneInString(str[:2]) [all...] |
/prebuilts/go/linux-x86/src/unicode/utf8/ |
example_test.go | 9 "unicode/utf8" 16 r, size := utf8.DecodeLastRune(b) 37 r, size := utf8.DecodeLastRuneInString(str) 59 r, size := utf8.DecodeRune(b) 80 r, size := utf8.DecodeRuneInString(str) 101 n := utf8.EncodeRune(buf, r) 112 fmt.Println(utf8.FullRune(buf)) 113 fmt.Println(utf8.FullRune(buf[:2])) 121 fmt.Println(utf8.FullRuneInString(str)) 122 fmt.Println(utf8.FullRuneInString(str[:2]) [all...] |
/external/libxkbcommon/xkbcommon/src/compose/ |
table.h | 81 /* Offset into xkb_compose_table::utf8. */ 82 uint32_t utf8; member in struct:compose_node::__anon26675::__anon26676 96 darray_char utf8; member in struct:xkb_compose_table
|
/prebuilts/go/darwin-x86/test/fixedbugs/ |
issue11362.go | 11 import _ "unicode//utf8" // ERROR "non-canonical import path .unicode//utf8. \(should be .unicode/utf8.\)" "can't find import: .unicode//utf8."
|
/prebuilts/go/linux-x86/test/fixedbugs/ |
issue11362.go | 11 import _ "unicode//utf8" // ERROR "non-canonical import path .unicode//utf8. \(should be .unicode/utf8.\)" "can't find import: .unicode//utf8."
|
/external/mp4parser/isoparser/src/main/java/com/coremedia/iso/ |
Utf8.java | 23 public final class Utf8 { 48 public static int utf8StringLengthInBytes(String utf8) { 50 if (utf8 != null) { 51 return utf8.getBytes("UTF-8").length;
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
UTF8CharsetTest.java | 31 super(arg0, "UTF-8", new String[] { "UTF8" }, true, true); 59 byte utf8[] = s.getBytes("UTF-8"); 60 assertEquals(s, new String(utf8, 0, utf8.length, "UTF-8"));
|
/external/skia/src/core/ |
SkUtils.h | 39 inline int SkUTF8_CountUTF8Bytes(const char utf8[]) { 40 SkASSERT(utf8); 41 return SkUTF8_LeadByteToCount(*(const uint8_t*)utf8); 44 int SkUTF8_CountUnichars(const char utf8[]); 47 int SkUTF8_CountUnichars(const void* utf8, size_t byteLength); 51 /** This function is safe: invalid UTF8 sequences will return -1 67 SkUnichar SkUTF8_ToUnichar(const char utf8[]); 72 into a utf8 sequence. Will be 1..kMaxBytesInUTF8Sequence, 75 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[] = nullptr); 90 char utf8[] = nullptr) [all...] |
SkUtils.cpp | 46 * @returns -1 iff invalid UTF8 byte, 47 * 0 iff UTF8 continuation byte, 68 int SkUTF8_CountUnichars(const char utf8[]) { 69 SkASSERT(utf8); 74 int c = *(const uint8_t*)utf8; 78 utf8 += SkUTF8_LeadByteToCount(c); 87 const char* utf8 = static_cast<const char*>(text); local 93 const char* stop = utf8 + byteLength; 95 while (utf8 < stop) { 96 int type = utf8_byte_type(*(const uint8_t*)utf8); [all...] |
/external/skqp/src/core/ |
SkUtils.h | 39 inline int SkUTF8_CountUTF8Bytes(const char utf8[]) { 40 SkASSERT(utf8); 41 return SkUTF8_LeadByteToCount(*(const uint8_t*)utf8); 44 int SkUTF8_CountUnichars(const char utf8[]); 47 int SkUTF8_CountUnichars(const void* utf8, size_t byteLength); 51 /** This function is safe: invalid UTF8 sequences will return -1 67 SkUnichar SkUTF8_ToUnichar(const char utf8[]); 72 into a utf8 sequence. Will be 1..kMaxBytesInUTF8Sequence, 75 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[] = nullptr); 90 char utf8[] = nullptr) [all...] |
SkUtils.cpp | 46 * @returns -1 iff invalid UTF8 byte, 47 * 0 iff UTF8 continuation byte, 68 int SkUTF8_CountUnichars(const char utf8[]) { 69 SkASSERT(utf8); 74 int c = *(const uint8_t*)utf8; 78 utf8 += SkUTF8_LeadByteToCount(c); 87 const char* utf8 = static_cast<const char*>(text); local 93 const char* stop = utf8 + byteLength; 95 while (utf8 < stop) { 96 int type = utf8_byte_type(*(const uint8_t*)utf8); [all...] |
/external/pdfium/fxbarcode/ |
BC_UtilCodingConvert.cpp | 27 ByteString utf8 = unicode.UTF8Encode(); local 28 dst = std::vector<uint8_t>(utf8.begin(), utf8.end()); 33 ByteString utf8; local 35 utf8 += value; 37 WideString unicode = WideString::FromUTF8(utf8.AsStringView());
|
/external/webrtc/webrtc/base/ |
iosfilesystem.mm | 22 // Return a new[]'d |char*| copy of the UTF8 representation of |s|. 25 const char* utf8 = [s UTF8String]; 26 size_t len = strlen(utf8) + 1; 31 strcpy(copy, utf8);
|
/external/flac/libFLAC/ |
format.c | 312 static unsigned utf8len_(const FLAC__byte *utf8) 314 FLAC__ASSERT(0 != utf8); 315 if ((utf8[0] & 0x80) == 0) { 318 else if ((utf8[0] & 0xE0) == 0xC0 && (utf8[1] & 0xC0) == 0x80) { 319 if ((utf8[0] & 0xFE) == 0xC0) /* overlong sequence check */ 323 else if ((utf8[0] & 0xF0) == 0xE0 && (utf8[1] & 0xC0) == 0x80 && (utf8[2] & 0xC0) == 0x80) { 324 if (utf8[0] == 0xE0 && (utf8[1] & 0xE0) == 0x80) /* overlong sequence check * [all...] |
/external/turbine/java/com/google/turbine/bytecode/ |
ConstantPool.java | 57 case UTF8: 94 int utf8 = utf8(value); local 95 if (classInfoPool.containsKey(utf8)) { 96 return classInfoPool.get(utf8); 98 int index = insert(new Entry(Kind.CLASS_INFO, new IntValue(utf8))); 99 classInfoPool.put(utf8, index); 104 int utf8(String value) { method in class:ConstantPool 109 int index = insert(new Entry(Kind.UTF8, new StringValue(value))); 152 int utf8 = utf8(value) local [all...] |
/art/libdexfile/dex/ |
utf.h | 38 size_t CountModifiedUtf8Chars(const char* utf8); 39 size_t CountModifiedUtf8Chars(const char* utf8, size_t byte_count); 64 int CompareModifiedUtf8ToUtf16AsCodePointValues(const char* utf8, const uint16_t* utf16, 88 int32_t ComputeUtf16HashFromModifiedUtf8(const char* utf8, size_t utf16_length); 131 std::string PrintableString(const char* utf8);
|
utf.cc | 32 size_t CountModifiedUtf8Chars(const char* utf8) { 33 return CountModifiedUtf8Chars(utf8, strlen(utf8)); 37 * This does not validate UTF8 rules (nor did older code). But it gets the right answer 51 size_t CountModifiedUtf8Chars(const char* utf8, size_t byte_count) { 52 DCHECK_LE(byte_count, strlen(utf8)); 54 const char* end = utf8 + byte_count; 55 for (; utf8 < end; ++utf8) { 56 int ic = *utf8; [all...] |
/external/harfbuzz_ng/util/ |
helper-cairo.hh | 57 char *utf8; member in struct:helper_cairo_line_t 68 if (utf8) 69 g_free (utf8);
|
/external/xmp_toolkit/XMPCore/src/com/adobe/xmp/impl/ |
Latin1Converter.java | 38 * A converter that processes a byte buffer containing a mix of UTF8 and Latin-1/Cp1252 chars. 46 * In the case, UTF-8 is detected, it assumes wrong UTF8 chars to be a sequence of 74 // expected UTF8 bytesto come 94 // start of UTF8 sequence 106 // invalid UTF8 start char, assume to be Latin-1 107 byte[] utf8 = convertToUTF8((byte) b); 108 out.append(utf8); 115 // valid UTF8 char, add to readAheadBuffer 129 // invalid UTF8 char: 130 // 1. convert first of seq to UTF8 [all...] |
/external/libchrome/base/strings/ |
utf_string_conversions.cc | 79 std::wstring UTF8ToWide(StringPiece utf8) { 80 if (IsStringASCII(utf8)) { 81 return std::wstring(utf8.begin(), utf8.end()); 85 PrepareForUTF16Or32Output(utf8.data(), utf8.length(), &ret); 86 ConvertUnicode(utf8.data(), utf8.length(), &ret); 145 // UTF16 <-> UTF8 -------------------------------------------------------------- 159 string16 UTF8ToUTF16(StringPiece utf8) { [all...] |
/device/linaro/bootloader/edk2/BaseTools/Scripts/ |
ConvertUni.py | 37 def __init__(self, utf8, source):
38 self.utf8 = utf8
60 if self.utf8:
76 if bom != self.utf8:
118 self.ok &= ConvertOneArg(self.utf8, arg).ok
134 self.utf8 = not self.args.utf_16
|