HomeSort by relevance Sort by last modified time
    Searched refs:utf8 (Results 1 - 25 of 276) 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...]
  /external/skia/src/core/
SkUtils.h 45 inline int SkUTF8_CountUTF8Bytes(const char utf8[]) {
46 SkASSERT(utf8);
47 return SkUTF8_LeadByteToCount(*(const uint8_t*)utf8);
50 int SkUTF8_CountUnichars(const char utf8[]);
51 int SkUTF8_CountUnichars(const char utf8[], size_t byteLength);
52 SkUnichar SkUTF8_ToUnichar(const char utf8[]);
57 into a utf8 sequence. Will be 1..kMaxBytesInUTF8Sequence,
60 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[] = NULL);
76 char utf8[] = NULL);
SkUtils.cpp 37 int SkUTF8_CountUnichars(const char utf8[]) {
38 SkASSERT(utf8);
43 int c = *(const uint8_t*)utf8;
47 utf8 += SkUTF8_LeadByteToCount(c);
53 int SkUTF8_CountUnichars(const char utf8[], size_t byteLength) {
54 SkASSERT(utf8 || 0 == byteLength);
57 const char* stop = utf8 + byteLength;
59 while (utf8 < stop) {
60 utf8 += SkUTF8_LeadByteToCount(*(const uint8_t*)utf8);
    [all...]
  /external/pdfium/xfa/src/fxbarcode/
BC_UtilCodingConvert.cpp 23 CFX_ByteString utf8 = unicode.UTF8Encode(); local
24 for (int32_t i = 0; i < utf8.GetLength(); i++) {
25 dst.Add(utf8[i]);
30 CFX_ByteString utf8; local
32 utf8 += src[i];
34 CFX_WideString unicode = CFX_WideString::FromUTF8(utf8, utf8.GetLength());
  /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/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...]
sys_string_conversions.h 35 BASE_EXPORT std::wstring SysUTF8ToWide(const StringPiece& utf8);
65 BASE_EXPORT CFStringRef SysUTF8ToCFStringRef(const std::string& utf8);
69 BASE_EXPORT NSString* SysUTF8ToNSString(const std::string& utf8);
  /external/svox/pico/lib/
picobase.c 44 * UTF8
    [all...]
  /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 42 size_t CountModifiedUtf8Chars(const char* utf8);
43 size_t CountModifiedUtf8Chars(const char* utf8, size_t byte_count);
68 int CompareModifiedUtf8ToUtf16AsCodePointValues(const char* utf8, const uint16_t* utf16,
86 int32_t ComputeUtf16HashFromModifiedUtf8(const char* utf8, size_t utf16_length);
  /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
  /external/webrtc/webrtc/system_wrappers/include/
utf_util_win.h 24 inline std::wstring ToUtf16(const char* utf8, size_t len) {
25 int len16 = ::MultiByteToWideChar(CP_UTF8, 0, utf8, static_cast<int>(len),
28 ::MultiByteToWideChar(CP_UTF8, 0, utf8, static_cast<int>(len), ws.get(),
  /external/libexif/test/nls/
test-codeset.c 43 char *utf8; member in struct:__anon14785
83 const char *utf8 = testcases[i].utf8; local
119 utf8
123 return (my_streq(transl, utf8));
  /libcore/ojluni/src/main/java/java/util/zip/
ZipCoder.java 105 // assume invoked only if "this" is not utf8
109 if (utf8 == null)
110 utf8 = new ZipCoder(StandardCharsets.UTF_8);
111 return utf8.getBytes(s);
118 if (utf8 == null)
119 utf8 = new ZipCoder(StandardCharsets.UTF_8);
120 return utf8.toString(ba, len);
131 private ZipCoder utf8; field in class:ZipCoder
  /external/harfbuzz_ng/src/
hb-glib.cc 253 gchar utf8[12];
258 len = g_unichar_to_utf8 (a, utf8);
259 len += g_unichar_to_utf8 (b, utf8 + len);
260 normalized = g_utf8_normalize (utf8, len, G_NORMALIZE_NFC);
290 gchar utf8[6];
295 len = g_unichar_to_utf8 (ab, utf8);
296 normalized = g_utf8_normalize (utf8, len, G_NORMALIZE_NFD);
348 gchar utf8[6];
353 utf8_len = g_unichar_to_utf8 (u, utf8);
354 utf8_decomposed = g_utf8_normalize (utf8, utf8_len, G_NORMALIZE_NFKD)
    [all...]
  /external/gptfdisk/
gptpart.cc 81 // convert name to utf32 then to utf8
82 string utf8 ; local
112 // then to utf8
114 utf8 += (char) uni ;
117 utf8 += (char) ( 0xc0 | ( uni >> 6 ) ) ;
118 utf8 += (char) ( 0x80 | ( uni & 0x3f ) ) ;
121 utf8 += (char) ( 0xe0 | ( uni >> 12 ) ) ;
122 utf8 += (char) ( 0x80 | ( ( uni >> 6 ) & 0x3f ) ) ;
123 utf8 += (char) ( 0x80 | ( uni & 0x3f ) ) ;
126 utf8 += (char) ( 0xf0 | ( uni >> 18 ) )
    [all...]

Completed in 4106 milliseconds

1 2 3 4 5 6 7 8 91011>>