HomeSort by relevance Sort by last modified time
    Searched refs:utf8 (Results 1 - 25 of 511) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /system/core/base/
utf8.cpp 19 #include "android-base/utf8.h"
42 bool WideToUTF8(const wchar_t* utf16, const size_t size, std::string* utf8) {
43 utf8->clear();
69 utf8->resize(chars_required);
72 &(*utf8)[0], chars_required, NULL,
78 utf8->clear();
85 bool WideToUTF8(const wchar_t* utf16, std::string* utf8) {
87 return WideToUTF8(utf16, wcslen(utf16), utf8);
90 bool WideToUTF8(const std::wstring& utf16, std::string* utf8) {
93 return WideToUTF8(utf16.c_str(), utf16.length(), utf8);
157 namespace utf8 { namespace in namespace:android::base
    [all...]
utf8_test.cpp 17 #include "android-base/utf8.h"
70 static std::wstring UTF8ToWide(const std::string& utf8) {
72 EXPECT_TRUE(UTF8ToWide(utf8, &utf16));
77 std::string utf8; local
78 EXPECT_TRUE(WideToUTF8(utf16, &utf8));
79 return utf8;
118 std::ostringstream utf8; local
119 utf8 << WideToUTF8(kConvertRoundtripCases[i]);
121 wide << UTF8ToWide(utf8.str());
138 const char* utf8; member in struct:android::base::UTF8ToWideCase
203 const char* utf8; member in struct:android::base::WideToUTF8Case
259 const char* utf8; member in struct:android::base::WideToUTF8Case
    [all...]
  /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.
35 bool WideToUTF8(const wchar_t* utf16, const size_t size, std::string* utf8);
39 bool WideToUTF8(const wchar_t* utf16, std::string* utf8);
43 bool WideToUTF8(const std::wstring& utf16, std::string* utf8);
47 bool UTF8ToWide(const char* utf8, const size_t size, std::wstring* utf16);
51 bool UTF8ToWide(const char* utf8, std::wstring* utf16);
55 bool UTF8ToWide(const std::string& utf8, std::wstring* utf16);
58 // The functions in the utf8 namespace take UTF-8 strings. For Windows, these
65 // using namespace android::base::utf8;
68 // int fd = open(name, ...); // Calls android::base::utf8::open()
73 namespace utf8 { namespace in namespace:android::base
    [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...]
  /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/skia/src/core/
SkUtils.h 32 inline int SkUTF8_CountUTF8Bytes(const char utf8[]) {
33 SkASSERT(utf8);
34 return SkUTF8_LeadByteToCount(*(const uint8_t*)utf8);
37 int SkUTF8_CountUnichars(const char utf8[]);
39 /** This function is safe: invalid UTF8 sequences will return -1; */
40 int SkUTF8_CountUnicharsWithError(const char utf8[], size_t byteLength);
42 /** This function is safe: invalid UTF8 sequences will return 0; */
43 inline int SkUTF8_CountUnichars(const char utf8[], size_t byteLength) {
44 return SkClampPos(SkUTF8_CountUnicharsWithError(utf8, byteLength));
47 /** This function is safe: invalid UTF8 sequences will return -
    [all...]
SkUtils.cpp 62 * @returns -1 iff invalid UTF8 byte,
63 * 0 iff UTF8 continuation byte,
84 int SkUTF8_CountUnichars(const char utf8[]) {
85 SkASSERT(utf8);
90 int c = *(const uint8_t*)utf8;
94 utf8 += SkUTF8_LeadByteToCount(c);
101 int SkUTF8_CountUnicharsWithError(const char utf8[], size_t byteLength) {
102 SkASSERT(utf8 || 0 == byteLength);
105 const char* stop = utf8 + byteLength;
107 while (utf8 < stop)
    [all...]
  /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"));
  /art/runtime/
utf.cc 27 size_t CountModifiedUtf8Chars(const char* utf8) {
28 return CountModifiedUtf8Chars(utf8, strlen(utf8));
32 * This does not validate UTF8 rules (nor did older code). But it gets the right answer
46 size_t CountModifiedUtf8Chars(const char* utf8, size_t byte_count) {
47 DCHECK_LE(byte_count, strlen(utf8));
49 const char* end = utf8 + byte_count;
50 for (; utf8 < end; ++utf8) {
51 int ic = *utf8;
    [all...]
utf.h 36 size_t CountModifiedUtf8Chars(const char* utf8);
37 size_t CountModifiedUtf8Chars(const char* utf8, size_t byte_count);
62 int CompareModifiedUtf8ToUtf16AsCodePointValues(const char* utf8, const uint16_t* utf16,
86 int32_t ComputeUtf16HashFromModifiedUtf8(const char* utf8, size_t utf16_length);
  /external/pdfium/xfa/fxbarcode/
BC_UtilCodingConvert.cpp 27 CFX_ByteString utf8 = unicode.UTF8Encode(); local
28 for (int32_t i = 0; i < utf8.GetLength(); i++) {
29 dst.Add(utf8[i]);
35 CFX_ByteString utf8; local
37 utf8 += src[i];
39 CFX_WideString unicode = CFX_WideString::FromUTF8(utf8.AsStringC());
  /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/harfbuzz_ng/util/
helper-cairo.hh 56 char *utf8; member in struct:helper_cairo_line_t
67 if (utf8)
68 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...]
utf_string_conversions_unittest.cc 53 std::ostringstream utf8; local
54 utf8 << WideToUTF8(kConvertRoundtripCases[i]);
56 wide << UTF8ToWide(utf8.str());
73 const char* utf8; member in struct:base::UTF8ToWideCase
103 UTF8ToWide(convert_cases[i].utf8,
104 strlen(convert_cases[i].utf8),
129 const char* utf8; member in struct:base::WideToUTF8Case
149 std::string expected(test.utf8);
159 const char* utf8; member in struct:base::WideToUTF8Case
180 std::string expected(test.utf8);
    [all...]
  /external/svox/pico/lib/
picobase.c 44 * 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
  /external/ImageMagick/MagickCore/
token-private.h 69 *utf8; local
74 utf8=(unsigned char *) NULL;
76 utf8=(unsigned char *) AcquireQuantumMemory(length+1UL,sizeof(*utf8));
77 if (utf8 == (unsigned char *) NULL)
79 q=utf8;
92 return(utf8);
  /external/ImageMagick/utilities/
magick.c 184 **utf8;
192 utf8=NTArgvToUTF8(argc,argv);
193 status=MagickMain(argc,utf8);
195 utf8[i]=DestroyString(utf8[i]);
196 utf8=(char **) RelinquishMagickMemory(utf8);
182 **utf8; local

Completed in 1084 milliseconds

1 2 3 4 5 6 7 8 91011>>