/external/python/cpython2/Lib/email/ |
D | header.py | 20 from email.charset import Charset 93 charset, encoding = [s.lower() for s in parts[0:2]] 112 if decoded and decoded[-1][1] == charset: 115 decoded.append((dec, charset)) 135 for s, charset in decoded_seq: 137 if charset is not None and not isinstance(charset, Charset): 138 charset = Charset(charset) 139 h.append(s, charset) 145 def __init__(self, s=None, charset=None, argument 173 if charset is None: [all …]
|
D | message.py | 16 import email.charset 218 def set_payload(self, payload, charset=None): argument 225 if charset is not None: 226 self.set_charset(charset) 228 def set_charset(self, charset): argument 243 if charset is None: 247 if isinstance(charset, basestring): 248 charset = email.charset.Charset(charset) 249 if not isinstance(charset, email.charset.Charset): 250 raise TypeError(charset) [all …]
|
/external/curl/lib/ |
D | curl_fnmatch.c | 70 static int parsekeyword(unsigned char **pattern, unsigned char *charset) in parsekeyword() argument 102 charset[CURLFNM_DIGIT] = 1; in parsekeyword() 104 charset[CURLFNM_ALNUM] = 1; in parsekeyword() 106 charset[CURLFNM_ALPHA] = 1; in parsekeyword() 108 charset[CURLFNM_XDIGIT] = 1; in parsekeyword() 110 charset[CURLFNM_PRINT] = 1; in parsekeyword() 112 charset[CURLFNM_GRAPH] = 1; in parsekeyword() 114 charset[CURLFNM_SPACE] = 1; in parsekeyword() 116 charset[CURLFNM_BLANK] = 1; in parsekeyword() 118 charset[CURLFNM_UPPER] = 1; in parsekeyword() [all …]
|
/external/python/cpython3/Lib/email/ |
D | header.py | 20 from email import charset as _charset 77 return [(_charset._encode(string, str(charset)), str(charset)) 78 for string, charset in header._chunks] 97 charset = parts.pop(0).lower() 100 words.append((encoded, encoding, charset)) 114 for encoded_string, encoding, charset in words: 117 decoded_words.append((encoded_string, charset)) 120 decoded_words.append((word, charset)) 130 decoded_words.append((word, charset)) 137 for word, charset in decoded_words: [all …]
|
D | _encoded_words.py | 161 _, charset, cte, cte_string, _ = ew.split('?') 162 charset, _, lang = charset.partition('*') 169 string = bstring.decode(charset) 172 "contains bytes not decodable using {} charset".format(charset))) 173 string = bstring.decode(charset, 'surrogateescape') 176 if charset.lower() != 'unknown-8bit': 178 "in encoded word; decoded as unknown bytes".format(charset))) 179 return string, charset, lang, defects 192 def encode(string, charset='utf-8', encoding=None, lang=''): argument 209 if charset == 'unknown-8bit': [all …]
|
D | utils.py | 40 from email.charset import Charset 76 def formataddr(pair, charset='utf-8'): argument 96 if isinstance(charset, str): 97 charset = Charset(charset) 98 encoded_name = charset.header_encode(name) 245 def encode_rfc2231(s, charset=None, language=None): argument 252 s = urllib.parse.quote(s, safe='', encoding=charset or 'ascii') 253 if charset is None and language is None: 257 return "%s'%s'%s" % (charset, language, s) 313 charset, language, value = decode_rfc2231(value) [all …]
|
D | message.py | 18 from email import charset as _charset 303 def set_payload(self, payload, charset=None): argument 310 if charset is None: 313 if not isinstance(charset, Charset): 314 charset = Charset(charset) 315 payload = payload.encode(charset.output_charset) 320 if charset is not None: 321 self.set_charset(charset) 323 def set_charset(self, charset): argument 337 if charset is None: [all …]
|
/external/icu/icu4j/main/tests/charset/src/com/ibm/icu/dev/test/charset/ |
D | TestConversion.java | 10 package com.ibm.icu.dev.test.charset; 14 import java.nio.charset.Charset; 15 import java.nio.charset.CharsetDecoder; 16 import java.nio.charset.CharsetEncoder; 17 import java.nio.charset.CoderResult; 18 import java.nio.charset.CodingErrorAction; 25 import com.ibm.icu.charset.CharsetCallback; 26 import com.ibm.icu.charset.CharsetDecoderICU; 27 import com.ibm.icu.charset.CharsetEncoderICU; 28 import com.ibm.icu.charset.CharsetICU; [all …]
|
/external/python/cpython2/Lib/bsddb/test/ |
D | test_all.py | 16 charset = "iso8859-1" # Full 8 bit variable 28 v = (v[0], v[1].decode(charset)) 36 v = (v[0], v[1].decode(charset)) 42 v = (v[0], v[1].decode(charset)) 48 v = (v[0], v[1].decode(charset)) 54 v = (v[0], v[1].decode(charset)) 60 v = (v[0], v[1].decode(charset)) 74 key = key.decode(charset) 75 return (key, value.decode(charset)) 93 k = bytes(k, charset) [all …]
|
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/ |
D | MediaType.java | 18 import java.nio.charset.Charset; 37 private final String charset; field in MediaType 39 private MediaType(String mediaType, String type, String subtype, String charset) { in MediaType() argument 43 this.charset = charset; in MediaType() 56 String charset = null; in parse() local 67 if (charset != null && !charsetParameter.equalsIgnoreCase(charset)) { in parse() 70 charset = charsetParameter; in parse() 73 return new MediaType(string, type, subtype, charset); in parse() 96 public Charset charset() { in charset() method in MediaType 97 return charset != null ? Charset.forName(charset) : null; in charset() [all …]
|
D | ResponseBody.java | 24 import java.nio.charset.Charset; 74 return r != null ? r : (reader = new InputStreamReader(byteStream(), charset())); in charStream() 83 return new String(bytes(), charset().name()); in string() 86 private Charset charset() { in charset() method in ResponseBody 88 return contentType != null ? contentType.charset(UTF_8) : UTF_8; in charset() 100 Charset charset = Util.UTF_8; in create() local 102 charset = contentType.charset(); in create() 103 if (charset == null) { in create() 104 charset = Util.UTF_8; in create() 108 Buffer buffer = new Buffer().writeString(content, charset); in create()
|
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/ |
D | MediaTypeTest.java | 20 import java.nio.charset.Charset; 21 import java.nio.charset.IllegalCharsetNameException; 22 import java.nio.charset.UnsupportedCharsetException; 41 assertEquals("UTF-8", mediaType.charset().name()); in testParse() 101 assertEquals("UTF-8", mediaType.charset().name()); in testCharsetIsOneOfManyParameters() 107 assertEquals("UTF-8", mediaType.charset().name()); in testCharsetAndQuoting() 112 assertEquals("UTF-8", mediaType.charset().name()); in testDuplicatedCharsets() 126 mediaType.charset(); in testIllegalCharsetName() 135 mediaType.charset(); in testUnsupportedCharset() 143 assertEquals("UTF-8", noCharset.charset(Util.UTF_8).name()); in testDefaultCharset() [all …]
|
/external/apache-http/src/org/apache/http/params/ |
D | HttpProtocolParams.java | 75 String charset = (String) params.getParameter in getHttpElementCharset() local 77 if (charset == null) { in getHttpElementCharset() 78 charset = HTTP.DEFAULT_PROTOCOL_CHARSET; in getHttpElementCharset() 80 return charset; in getHttpElementCharset() 87 public static void setHttpElementCharset(final HttpParams params, final String charset) { in setHttpElementCharset() argument 91 params.setParameter(CoreProtocolPNames.HTTP_ELEMENT_CHARSET, charset); in setHttpElementCharset() 103 String charset = (String) params.getParameter in getContentCharset() local 105 if (charset == null) { in getContentCharset() 106 charset = HTTP.DEFAULT_CONTENT_CHARSET; in getContentCharset() 108 return charset; in getContentCharset() [all …]
|
/external/guava/guava/src/com/google/common/hash/ |
D | Funnels.java | 22 import java.nio.charset.Charset; 84 public static Funnel<CharSequence> stringFunnel(Charset charset) { in stringFunnel() argument 85 return new StringCharsetFunnel(charset); in stringFunnel() 89 private final Charset charset; field in Funnels.StringCharsetFunnel 91 StringCharsetFunnel(Charset charset) { in StringCharsetFunnel() argument 92 this.charset = Preconditions.checkNotNull(charset); in StringCharsetFunnel() 96 into.putString(from, charset); in funnel() 100 return "Funnels.stringFunnel(" + charset.name() + ")"; in toString() 106 return this.charset.equals(funnel.charset); in equals() 112 return StringCharsetFunnel.class.hashCode() ^ charset.hashCode(); in hashCode() [all …]
|
/external/apache-http/src/org/apache/http/util/ |
D | EncodingUtils.java | 67 String charset in getString() argument 74 if (charset == null || charset.length() == 0) { in getString() 79 return new String(data, offset, length, charset); in getString() 95 public static String getString(final byte[] data, final String charset) { in getString() argument 99 return getString(data, 0, data.length, charset); in getString() 110 public static byte[] getBytes(final String data, final String charset) { in getBytes() argument 116 if (charset == null || charset.length() == 0) { in getBytes() 121 return data.getBytes(charset); in getBytes()
|
D | EntityUtils.java | 99 String charset = null; in getContentCharSet() local 105 charset = param.getValue(); in getContentCharSet() 109 return charset; in getContentCharSet() 128 String charset = getContentCharSet(entity); in toString() local 129 if (charset == null) { in toString() 130 charset = defaultCharset; in toString() 132 if (charset == null) { in toString() 133 charset = HTTP.DEFAULT_CONTENT_CHARSET; in toString() 135 Reader reader = new InputStreamReader(instream, charset); in toString()
|
/external/glide/third_party/disklrucache/src/main/java/com/bumptech/glide/disklrucache/ |
D | StrictLineReader.java | 25 import java.nio.charset.Charset; 50 private final Charset charset; field in StrictLineReader 71 public StrictLineReader(InputStream in, Charset charset) { in StrictLineReader() argument 72 this(in, 8192, charset); in StrictLineReader() 86 public StrictLineReader(InputStream in, int capacity, Charset charset) { in StrictLineReader() argument 87 if (in == null || charset == null) { in StrictLineReader() 93 if (!(charset.equals(Util.US_ASCII))) { in StrictLineReader() 98 this.charset = charset; in StrictLineReader() 141 String res = new String(buf, pos, lineEnd - pos, charset.name()); in readLine() 153 return new String(buf, 0, length, charset.name()); in readLine()
|
/external/guava/guava/src/com/google/common/io/ |
D | Files.java | 49 import java.nio.charset.Charset; 81 public static BufferedReader newReader(File file, Charset charset) in newReader() argument 84 checkNotNull(charset); in newReader() 86 new InputStreamReader(new FileInputStream(file), charset)); in newReader() 98 public static BufferedWriter newWriter(File file, Charset charset) in newWriter() argument 101 checkNotNull(charset); in newWriter() 103 new OutputStreamWriter(new FileOutputStream(file), charset)); in newWriter() 215 public static CharSource asCharSource(File file, Charset charset) { in asCharSource() argument 216 return asByteSource(file).asCharSource(charset); in asCharSource() 229 public static CharSink asCharSink(File file, Charset charset, in asCharSink() argument [all …]
|
D | ByteSink.java | 27 import java.nio.charset.Charset; 58 public CharSink asCharSink(Charset charset) { in asCharSink() argument 59 return new AsCharSink(charset); in asCharSink() 140 private final Charset charset; field in ByteSink.AsCharSink 142 private AsCharSink(Charset charset) { in AsCharSink() argument 143 this.charset = checkNotNull(charset); in AsCharSink() 148 return new OutputStreamWriter(ByteSink.this.openStream(), charset); in openStream() 153 return ByteSink.this.toString() + ".asCharSink(" + charset + ")"; in toString()
|
/external/curl/tests/data/ |
D | test2031 | 16 Content-Type: text/html; charset=iso-8859-1 26 Content-Type: text/html; charset=iso-8859-1 36 Content-Type: text/html; charset=iso-8859-1 47 Content-Type: text/html; charset=iso-8859-1 57 Content-Type: text/html; charset=iso-8859-1 67 Content-Type: text/html; charset=iso-8859-1 77 Content-Type: text/html; charset=iso-8859-1 87 Content-Type: text/html; charset=iso-8859-1 97 Content-Type: text/html; charset=iso-8859-1 108 Content-Type: text/html; charset=iso-8859-1 [all …]
|
D | test2028 | 20 Content-Type: text/html; charset=iso-8859-1 31 Content-Type: text/html; charset=iso-8859-1 43 Content-Type: text/html; charset=iso-8859-1 54 Content-Type: text/html; charset=iso-8859-1 64 Content-Type: text/html; charset=iso-8859-1 74 Content-Type: text/html; charset=iso-8859-1 85 Content-Type: text/html; charset=iso-8859-1 97 Content-Type: text/html; charset=iso-8859-1 108 Content-Type: text/html; charset=iso-8859-1 118 Content-Type: text/html; charset=iso-8859-1 [all …]
|
/external/sl4a/ScriptingLayerForAndroid/src/org/connectbot/service/ |
D | Relay.java | 24 import org.apache.harmony.niochar.charset.additional.IBM437; 31 import java.nio.charset.Charset; 32 import java.nio.charset.CharsetDecoder; 33 import java.nio.charset.CoderResult; 34 import java.nio.charset.CodingErrorAction; 73 Charset charset; in setCharset() local 75 charset = new IBM437("IBM437", new String[] { "IBM437", "CP437" }); in setCharset() 77 charset = Charset.forName(encoding); in setCharset() 80 if (charset == currentCharset || charset == null) { in setCharset() 84 CharsetDecoder newCd = charset.newDecoder(); in setCharset() [all …]
|
/external/oauth/core/src/main/java/net/oauth/http/ |
D | HttpMessage.java | 134 String charset = m.group(1); in getCharset() local 135 if (charset.length() >= 2 && charset.charAt(0) == '"' in getCharset() 136 && charset.charAt(charset.length() - 1) == '"') { in getCharset() 137 charset = charset.substring(1, charset.length() - 1); in getCharset() 138 charset = charset.replace("\\\"", "\""); in getCharset() 140 return charset; in getCharset()
|
/external/icu/icu4j/tools/misc/src/com/ibm/icu/dev/tool/charsetdet/sbcs/ |
D | InputFile.java | 18 import java.nio.charset.CharacterCodingException; 19 import java.nio.charset.Charset; 20 import java.nio.charset.CharsetDecoder; 21 import java.nio.charset.CharsetEncoder; 22 import java.nio.charset.CodingErrorAction; 37 private Charset charset; field in InputFile 111 charset = Charset.forName(encoding); in setEncoding() 112 decoder = charset.newDecoder(); in setEncoding() 113 encoder = charset.newEncoder(); in setEncoding() 124 return charset.displayName(); in getEncoding()
|
/external/pdfium/core/fpdfapi/font/ |
D | cpdf_cmapmanager.cpp | 44 CPDF_CID2UnicodeMap* CPDF_CMapManager::GetCID2UnicodeMap(CIDSet charset, in GetCID2UnicodeMap() argument 46 if (!m_CID2UnicodeMaps[charset]) in GetCID2UnicodeMap() 47 m_CID2UnicodeMaps[charset] = LoadCID2UnicodeMap(charset, bPromptCJK); in GetCID2UnicodeMap() 49 return m_CID2UnicodeMaps[charset].get(); in GetCID2UnicodeMap() 53 CIDSet charset, in LoadCID2UnicodeMap() argument 56 pMap->Load(this, charset, bPromptCJK); in LoadCID2UnicodeMap()
|