357 references to UTF8
mscorlib (43)
system\appdomain.cs (1)
2836
StreamWriter writer = new StreamWriter( ms, Encoding.
UTF8
);
system\diagnostics\eventing\eventprovider.cs (2)
321
string key = System.Text.Encoding.
UTF8
.GetString(data, keyIndex, keyEnd - keyIndex);
322
string value = System.Text.Encoding.
UTF8
.GetString(data, valueIdx, valueEnd - valueIdx);
system\diagnostics\eventing\eventsource.cs (2)
466
return (manifestBytes == null) ? null : Encoding.
UTF8
.GetString(manifestBytes, 0, manifestBytes.Length);
6305
return Encoding.
UTF8
.GetBytes(str);
System\Diagnostics\Eventing\TraceLogging\FieldMetadata.cs (2)
116
this.nameSize = Encoding.
UTF8
.GetByteCount(this.name) + 1;
177
Encoding.
UTF8
.GetBytes(this.name, 0, this.name.Length, metadata, pos);
System\Diagnostics\Eventing\TraceLogging\Statics.cs (2)
89
int metadataSize = Encoding.
UTF8
.GetByteCount(name) + 3 + prefixSize + suffixSize;
94
Encoding.
UTF8
.GetBytes(name, 0, name.Length, metadata, 2 + prefixSize);
System\Diagnostics\Eventing\TraceLogging\TraceLoggingEventSource.cs (2)
781
metaData.AddRange(Encoding.
UTF8
.GetBytes(value.Substring(1)));
798
metaData.AddRange(Encoding.
UTF8
.GetBytes(value));
system\io\file.cs (4)
791
return InternalReadAllText(path, Encoding.
UTF8
, true);
821
return InternalReadAllText(path, Encoding.
UTF8
, false);
995
return InternalReadAllLines(path, Encoding.
UTF8
);
1041
return ReadLinesIterator.CreateIterator(path, Encoding.
UTF8
);
system\io\fileinfo.cs (1)
255
return new StreamReader(FullPath, Encoding.
UTF8
, true, StreamReader.DefaultBufferSize, false);
system\io\streamreader.cs (3)
138
: this(stream, Encoding.
UTF8
, detectEncodingFromByteOrderMarks, DefaultBufferSize, false) {
202
: this(path, Encoding.
UTF8
, detectEncodingFromByteOrderMarks, DefaultBufferSize) {
505
encoding = Encoding.
UTF8
;
system\reflection\emit\customattributebuilder.cs (1)
364
byte[] utf8Str = Encoding.
UTF8
.GetBytes(str);
system\resources\resourcereader.cs (3)
167
_store = new BinaryReader(new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read, DefaultFileStreamBufferSize, FileOptions.RandomAccess, Path.GetFileName(fileName), false), Encoding.
UTF8
);
189
_store = new BinaryReader(stream, Encoding.
UTF8
);
209
_store = new BinaryReader(stream, Encoding.
UTF8
);
system\resources\resourcewriter.cs (2)
290
BinaryWriter bw = new BinaryWriter(_output, Encoding.
UTF8
);
379
BinaryWriter data = new BinaryWriter(dataSection, Encoding.
UTF8
);
system\rttype.cs (4)
392
int cUtf8Name = Encoding.
UTF8
.GetByteCount(pName, cNameLen);
420
Encoding.
UTF8
.GetBytes(pName, cNameLen, pUtf8Name, cUtf8Name);
5956
int cResult = Encoding.
UTF8
.GetCharCount(buf, m_StringHeapByteLength);
5958
Encoding.
UTF8
.GetChars(buf, m_StringHeapByteLength, result, cResult);
system\runtime\serialization\formatters\binary\binaryformatterwriter.cs (1)
52
dataWriter = new BinaryWriter(sout, Encoding.
UTF8
);
system\security\permissions\permissionattributes.cs (1)
1139
Encoding[] encodings = new Encoding[] { Encoding.
UTF8
,
system\security\policy\policylevel.cs (1)
828
Encoding encoding = Encoding.
UTF8
;
system\security\policymanager.cs (1)
302
Encoding encoding = Encoding.
UTF8
;
system\security\util\tokenizer.cs (1)
226
if (encoding == System.Text.Encoding.
UTF8
)
system\stubhelpers.cs (8)
156
nb = strManaged.GetBytesFromEncoding(pbNativeBuffer, nb, Encoding.
UTF8
);
161
nb = Encoding.
UTF8
.GetByteCount(strManaged);
164
strManaged.GetBytesFromEncoding(pbNativeBuffer, nb, Encoding.
UTF8
);
176
return String.CreateStringFromEncoding((byte*)cstr, nbBytes, Encoding.
UTF8
);
204
int nb = Encoding.
UTF8
.GetByteCount(strManaged);
208
nb = strManaged.GetBytesFromEncoding(pbNativeBuffer, nb, Encoding.
UTF8
);
221
int numChar = Encoding.
UTF8
.GetCharCount((byte*)pNative, nbBytes);
233
numChar = Encoding.
UTF8
.GetChars((byte*)pNative, nbBytes, pBuffer, numChar);
system\text\encoding.cs (1)
499
result =
UTF8
;
PresentationBuildTasks (1)
BuildTasks\Microsoft\Build\Tasks\Windows\UpdateManifestForBrowserApplication.cs (1)
131
manifestWriter = new XmlTextWriter(appManifestFile, System.Text.Encoding.
UTF8
);
PresentationFramework (2)
src\Framework\System\Windows\Controls\DataGridClipboardHelper.cs (1)
88
byte[] destinationBytes = Encoding.Convert(Encoding.Unicode, Encoding.
UTF8
, sourceBytes);
src\Framework\System\Windows\Documents\FixedSchema.cs (1)
47
!encoding.Equals(Encoding.
UTF8
.WebName, StringComparison.OrdinalIgnoreCase))
SMSvcHost (2)
System\ServiceModel\Activation\RoutingTable.cs (2)
150
int encodedSize = System.Text.Encoding.
UTF8
.GetByteCount(path.BaseAddress.AbsoluteUri);
223
int encodedSize = System.Text.Encoding.
UTF8
.GetByteCount(path.BaseAddress.AbsoluteUri);
System (37)
compmod\microsoft\csharp\csharpcodeprovider.cs (4)
676
using (StreamWriter sw = new StreamWriter(temp, Encoding.
UTF8
)) {
3440
string [] lines = ReadAllLines(outputFile, Encoding.
UTF8
, FileShare.ReadWrite);
3739
using (StreamWriter sw = new StreamWriter(temp, Encoding.
UTF8
)){
3813
using (StreamWriter sw = new StreamWriter(fileStream, Encoding.
UTF8
)) {
compmod\microsoft\visualbasic\VBCodeProvider.cs (1)
2892
string fileStr = Encoding.
UTF8
.GetString(fileBytes);
compmod\system\codedom\compiler\CodeCompiler.cs (4)
267
using (StreamWriter sw = new StreamWriter(temp, Encoding.
UTF8
)){
380
StreamReader sr = new StreamReader(outputStream, Encoding.
UTF8
);
460
using (StreamWriter sw = new StreamWriter(temp, Encoding.
UTF8
)) {
505
using (StreamWriter sw = new StreamWriter(fileStream, Encoding.
UTF8
)) {
compmod\system\codedom\compiler\Executor.cs (1)
164
StreamWriter sw = new StreamWriter(output, Encoding.
UTF8
);
net\System\IriHelper.cs (2)
231
Encoding noFallbackCharUTF8 = (Encoding)Encoding.
UTF8
.Clone();
355
int encodedBytesCount = Encoding.
UTF8
.GetBytes(pInput + next, surrogatePair ? 2 : 1, pEncodedBytes, maxNumberOfBytesEncoded);
net\System\Net\_CommandStream.cs (1)
483
private Encoding m_Encoding = Encoding.
UTF8
;
net\System\Net\_DigestClient.cs (2)
857
value = Encoding.
UTF8
.GetString(bytes);
892
byte[] bytes = charset==Charset.UTF8 ? Encoding.
UTF8
.GetBytes(rawString) : Encoding.Default.GetBytes(rawString);
net\System\Net\_FtpControlStream.cs (1)
293
Encoding = Encoding.
UTF8
;
net\System\Net\_RegBlobWebProxyDataBuilder.cs (1)
164
stringOut = Encoding.
UTF8
.GetString(m_RegistryBytes, m_ByteOffset, stringSize);
net\System\Net\mail\BufferBuilder.cs (1)
72
byte[] bytes = Encoding.
UTF8
.GetBytes(value.ToCharArray(), offset, count);
net\System\Net\mail\MimeBasePart.cs (1)
20
if (encoding == Encoding.Unicode || encoding == Encoding.
UTF8
|| encoding == Encoding.UTF32 || encoding == Encoding.BigEndianUnicode) {
net\System\Net\mail\SmtpLoginAuthenticationModule.cs (2)
58
return new Authorization(Convert.ToBase64String(System.Text.Encoding.
UTF8
.GetBytes(userName)), false);
65
return new Authorization(Convert.ToBase64String(System.Text.Encoding.
UTF8
.GetBytes(cachedCredential.Password)), true);
net\System\Net\mail\SmtpReplyReaderFactory.cs (2)
345
builder.Append(Encoding.
UTF8
.GetString(byteBuffer, start, actual));
479
builder.Append(Encoding.
UTF8
.GetString(parent.byteBuffer, start, actual));
net\System\Net\webclient.cs (3)
632
formHeaderBytes = Encoding.
UTF8
.GetBytes(formHeader);
1625
Encoding[] encodings = { Encoding.
UTF8
, Encoding.UTF32, Encoding.Unicode, Encoding.BigEndianUnicode };
1674
return UrlEncode(str, Encoding.
UTF8
);
net\System\Net\WebHeaderCollection.cs (1)
2106
m_Bytes = Encoding.
UTF8
.GetBytes(m_String);
net\System\Net\WebSockets\WebSocketBase.cs (1)
2169
byte[] blob = UTF8Encoding.
UTF8
.GetBytes(CloseReason);
net\System\Net\WebSockets\WebSocketBuffer.cs (1)
438
reason = Encoding.
UTF8
.GetString(reasonBlob.Array, reasonBlob.Offset, reasonBlob.Count);
net\System\Net\WebSockets\WebSocketHelpers.cs (2)
206
byte[] toHash = Encoding.
UTF8
.GetBytes(acceptString);
438
length = UTF8Encoding.
UTF8
.GetByteCount(statusDescription);
net\System\Net\WebUtility.cs (3)
471
byte[] bytes = Encoding.
UTF8
.GetBytes(value);
472
return Encoding.
UTF8
.GetString(UrlEncode(bytes, 0, bytes.Length, false /* alwaysCreateNewReturnValue */));
590
return UrlDecodeInternal(encodedValue, Encoding.
UTF8
);
net\System\UriHelper.cs (3)
165
short numberOfBytes = (short)Encoding.
UTF8
.GetBytes(pStr+i, count, bytes,
474
Encoding noFallbackCharUTF8 = (Encoding)Encoding.
UTF8
.Clone();
516
byte[] encodedBytes = Encoding.
UTF8
.GetBytes(unescapedChars, j, isHighSurr ? 2 : 1);
System.Activities.Presentation (1)
System.Activities.Presentation\System\Activities\Presentation\WorkflowDesigner.cs (1)
578
using (StreamWriter fileStreamWriter = new StreamWriter(fileName, false, Encoding.
UTF8
))
System.Configuration (1)
System\Configuration\BaseConfigurationRecord.cs (1)
4468
_encoding = Encoding.
UTF8
;
System.Core (1)
System\Security\Cryptography\Xml\ManifestSignedXml.cs (1)
493
byte[] licenseXml = Encoding.
UTF8
.GetBytes(licenseNode.OuterXml);
System.Data (1)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\WorkflowDesigner.cs (1)
578
using (StreamWriter fileStreamWriter = new StreamWriter(fileName, false, Encoding.
UTF8
))
System.Data.Entity (2)
System\Data\Common\CommandTrees\Internal\XmlExpressionDumper.cs (1)
27
internal static Encoding DefaultEncoding { get { return Encoding.
UTF8
; } }
System\Data\Query\InternalTrees\Dump.cs (1)
58
internal static readonly Encoding DefaultEncoding = Encoding.
UTF8
;
System.Data.Entity.Design (1)
System\Data\Entity\Design\EntityDesignerUtils.cs (1)
127
settings.Encoding = Encoding.
UTF8
;
System.Data.Services (2)
parent\Client\System\Data\Services\Client\BatchStream.cs (1)
1062
return Encoding.
UTF8
;
System\Data\Services\Parsing\WebConvert.cs (1)
363
string keyValue = Encoding.
UTF8
.GetString(byteArrayValue);
System.Data.Services.Client (3)
System\Data\Services\Client\BatchStream.cs (1)
1062
return Encoding.
UTF8
;
System\Data\Services\Client\DataServiceContext.cs (2)
4678
encoding = Encoding.
UTF8
;
5273
Encoding encoding = Encoding.
UTF8
;
System.Data.SqlXml (2)
System\Xml\Xsl\XsltOld\SequentialOutput.cs (1)
540
this.utf8Encoding = Encoding.
UTF8
;
System\Xml\Xsl\XsltOld\XsltOutput.cs (1)
29
private Encoding encoding = System.Text.Encoding.
UTF8
;
System.IdentityModel (31)
System\IdentityModel\Configuration\ConfigurationElementInterceptor.cs (1)
19
using ( XmlReader newReader = XmlDictionaryReader.CreateTextReader( Encoding.
UTF8
.GetBytes( elementXml.DocumentElement.OuterXml ), XmlDictionaryReaderQuotas.Max ) )
System\IdentityModel\Diagnostics\DigestTraceRecordHelper.cs (1)
66
string contentAsString = System.Text.Encoding.
UTF8
.GetString(contentBuffer, 0, (int)_logStream.Length);
System\IdentityModel\EnvelopedSignatureWriter.cs (2)
87
XmlDictionaryWriter effectiveWriter = XmlDictionaryWriter.CreateTextWriter(_writerStream, Encoding.
UTF8
, false);
102
base.InitializeTracingWriter(new XmlTextWriter(_preCanonicalTracingStream, Encoding.
UTF8
));
System\IdentityModel\Metadata\MetadataSerializer.cs (1)
2605
using (XmlDictionaryWriter writer = XmlDictionaryWriter.CreateTextWriter(stream, Encoding.
UTF8
, false))
System\IdentityModel\ProtectedDataCookieTransform.cs (1)
29
this.entropy = Encoding.
UTF8
.GetBytes( entropyString );
System\IdentityModel\Protocols\WSTrust\WSTrustSerializationHelper.cs (2)
2809
using (XmlWriter writer = XmlDictionaryWriter.CreateTextWriter(ms, Encoding.
UTF8
, false))
2822
XmlDictionaryReader memoryReader = XmlDictionaryReader.CreateTextReader(ms, Encoding.
UTF8
, XmlDictionaryReaderQuotas.Max, null);
System\IdentityModel\RsaEncryptionCookieTransform.cs (2)
207
byte[] hashedKey = hash.ComputeHash(Encoding.
UTF8
.GetBytes(key.ToXmlString(false)));
286
rsaHash = hash.ComputeHash(Encoding.
UTF8
.GetBytes(encryptionKey.ToXmlString(false)));
System\IdentityModel\SignatureResourcePool.cs (2)
118
this.utf8Writer = XmlDictionaryWriter.CreateTextWriter(Stream.Null, Encoding.
UTF8
, false);
122
((IXmlTextWriterInitializer) this.utf8Writer).SetOutput(Stream.Null, Encoding.
UTF8
, false);
System\IdentityModel\SignedXml.cs (3)
879
using (XmlDictionaryWriter utf8Writer = XmlDictionaryWriter.CreateTextWriter(Stream.Null, Encoding.
UTF8
, false))
900
using (XmlDictionaryWriter bufferingWriter = XmlDictionaryWriter.CreateTextWriter(Stream.Null, Encoding.
UTF8
, false))
931
settings.Encoding = Encoding.
UTF8
;
System\IdentityModel\Tokens\BootstrapContext.cs (3)
52
_tokenString = Text.Encoding.
UTF8
.GetString(Convert.FromBase64String(info.GetString(_tokenKey)));
63
_tokenString = Text.Encoding.
UTF8
.GetString(Convert.FromBase64String(info.GetString(_tokenKey)));
163
using (XmlDictionaryWriter writer = XmlDictionaryWriter.CreateTextWriter(ms, Text.Encoding.
UTF8
, false))
System\IdentityModel\Tokens\EncryptedSecurityTokenHandler.cs (3)
207
DebugEncryptedTokenClearText(plainText, Encoding.
UTF8
);
316
using (XmlDictionaryWriter plaintextWriter = XmlDictionaryWriter.CreateTextWriter(plaintextStream, Encoding.
UTF8
, false))
352
DebugEncryptedTokenClearText(plainTextBytes, Encoding.
UTF8
);
System\IdentityModel\Tokens\Saml2SecurityTokenHandler.cs (6)
1250
using (XmlDictionaryWriter dicWriter = XmlDictionaryWriter.CreateTextWriter(ms, Encoding.
UTF8
, false))
1274
return Encoding.
UTF8
.GetString(ms.ToArray());
1685
key = Convert.ToBase64String(hashAlgorithm.ComputeHash(Encoding.
UTF8
.GetBytes(stringBuilder.ToString())));
1896
using (XmlDictionaryReader dicReader = XmlDictionaryReader.CreateTextReader(Encoding.
UTF8
.GetBytes(attributeValue), XmlDictionaryReaderQuotas.Max))
2824
writer = plaintextWriter = XmlDictionaryWriter.CreateTextWriter(plaintextStream, Encoding.
UTF8
, false);
4537
using (XmlWriter plaintextWriter = XmlDictionaryWriter.CreateTextWriter(plaintextStream, Encoding.
UTF8
, false))
System\IdentityModel\Tokens\SamlSecurityTokenHandler.cs (4)
630
using (XmlDictionaryWriter dicWriter = XmlDictionaryWriter.CreateTextWriter(ms, Encoding.
UTF8
, false))
652
return Encoding.
UTF8
.GetString(ms.ToArray());
825
key = Convert.ToBase64String(hashAlgorithm.ComputeHash(Encoding.
UTF8
.GetBytes(stringBuilder.ToString())));
1446
using (XmlDictionaryReader xmlReader = XmlDictionaryReader.CreateTextReader(Encoding.
UTF8
.GetBytes(attributeValue), XmlDictionaryReaderQuotas.Max))
System.Management (1)
WmiGenerator.cs (1)
215
tw = new StreamWriter(new FileStream (filePath,FileMode.Create),System.Text.Encoding.
UTF8
);
System.Runtime.Remoting (7)
channels\http\httpchannelhelper.cs (3)
316
byte[] uriBytes = Encoding.
UTF8
.GetBytes(uri);
357
byte[] uriBytes = Encoding.
UTF8
.GetBytes(uri);
362
String newUri = Encoding.
UTF8
.GetString(uriBytes, 0, length);
channels\http\httpremotinghandler.cs (1)
298
context.Response.ContentType = ComposeContentType("text/plain", Encoding.
UTF8
);
channels\http\httpstreams.cs (1)
732
requestURI = Encoding.
UTF8
.GetString(requestUriBytes, 0, decodedUriLength);
channels\tcp\tcpsocketmanager.cs (2)
310
return Encoding.
UTF8
.GetString(data);
335
byte[] strBytes = Encoding.
UTF8
.GetBytes(str);
System.Runtime.Serialization (39)
System\Runtime\Serialization\DataContract.cs (1)
1939
byte[] namespaceBytes = Encoding.
UTF8
.GetBytes(namespaces);
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (1)
280
XmlDictionaryWriter jsonWriter = JsonReaderWriterFactory.CreateJsonWriter(stream, Encoding.
UTF8
, false); // ownsStream
System\Runtime\Serialization\Json\JsonEncodingStreamWrapper.cs (1)
228
byteCount = Encoding.
UTF8
.GetBytes(chars, 0, charCount, bytes, 0);
System\Runtime\Serialization\Json\JsonReaderWriterFactory.cs (1)
57
return CreateJsonWriter(stream, Encoding.
UTF8
, true);
System\Runtime\Serialization\Json\JsonXmlDataContract.cs (1)
26
MemoryStream memoryStream = new MemoryStream(Encoding.
UTF8
.GetBytes(xmlContent));
System\Runtime\Serialization\Json\XmlJsonReader.cs (8)
607
XmlExceptionHelper.ThrowTokenExpected(this, "false", Encoding.
UTF8
.GetString(buffer, offset, 5));
615
XmlExceptionHelper.ThrowTokenExpected(this, "false", Encoding.
UTF8
.GetString(buffer, offset, 4) + (char)ch);
628
XmlExceptionHelper.ThrowTokenExpected(this, "true", Encoding.
UTF8
.GetString(buffer, offset, 4));
636
XmlExceptionHelper.ThrowTokenExpected(this, "true", Encoding.
UTF8
.GetString(buffer, offset, 4) + (char)ch);
649
XmlExceptionHelper.ThrowTokenExpected(this, "null", Encoding.
UTF8
.GetString(buffer, offset, 4));
662
XmlExceptionHelper.ThrowTokenExpected(this, "null", Encoding.
UTF8
.GetString(buffer, offset, 4) + (char)ch);
1276
string bufferAsString = Encoding.
UTF8
.GetString(buffer, offset, 4);
1287
bufferAsString = Encoding.
UTF8
.GetString(buffer, offset, 4);
System\Runtime\Serialization\Json\XmlJsonWriter.cs (1)
312
if (encoding.WebName != Encoding.
UTF8
.WebName)
System\Runtime\Serialization\XmlObjectSerializer.cs (1)
28
XmlDictionaryWriter writer = XmlDictionaryWriter.CreateTextWriter(stream, Encoding.
UTF8
, false /*ownsStream*/);
System\Xml\EncodingStreamWrapper.cs (1)
639
byteCount = Encoding.
UTF8
.GetBytes(chars, 0, charCount, bytes, 0);
System\Xml\XmlBaseWriter.cs (1)
1594
textFragmentWriter.SetOutput(stream, false, Encoding.
UTF8
);
System\Xml\XmlC14NWriter.cs (7)
194
element.prefixLength = Encoding.
UTF8
.GetByteCount(prefix);
196
element.localNameLength = Encoding.
UTF8
.GetByteCount(localName);
271
if (String.Compare(Encoding.
UTF8
.GetString(xmlnsBuffer, xmlnsAttribute.prefixOffset, xmlnsAttribute.prefixLength), this.inclusivePrefixes[i], StringComparison.Ordinal) == 0)
387
xmlnsAttribute.prefixLength = Encoding.
UTF8
.GetBytes(prefix, 0, prefix.Length, xmlnsBuffer, xmlnsOffset);
390
xmlnsAttribute.nsLength = Encoding.
UTF8
.GetBytes(ns, 0, ns.Length, xmlnsBuffer, xmlnsOffset);
446
attribute.prefixLength = Encoding.
UTF8
.GetByteCount(prefix);
448
attribute.localNameLength = Encoding.
UTF8
.GetByteCount(localName);
System\Xml\XmlDictionaryString.cs (1)
78
buffer = System.Text.Encoding.
UTF8
.GetBytes(value);
System\Xml\XmlDictionaryWriter.cs (1)
73
return CreateTextWriter(stream, Encoding.
UTF8
, true);
System\Xml\XmlMtomWriter.cs (1)
180
if (String.Compare(name, Encoding.
UTF8
.WebName, StringComparison.OrdinalIgnoreCase) == 0)
System\Xml\XmlNodeWriter.cs (8)
56
WriteStartElement(Encoding.
UTF8
.GetString(prefixBuffer, prefixOffset, prefixLength), Encoding.
UTF8
.GetString(localNameBuffer, localNameOffset, localNameLength));
63
WriteEndElement(Encoding.
UTF8
.GetString(prefixBuffer, prefixOffset, prefixLength), Encoding.
UTF8
.GetString(localNameBuffer, localNameOffset, localNameLength));
68
WriteXmlnsAttribute(Encoding.
UTF8
.GetString(prefixBuffer, prefixOffset, prefixLength), Encoding.
UTF8
.GetString(nsBuffer, nsOffset, nsLength));
74
WriteStartAttribute(Encoding.
UTF8
.GetString(prefixBuffer, prefixOffset, prefixLength), Encoding.
UTF8
.GetString(localNameBuffer, localNameOffset, localNameLength));
System\Xml\XmlUTF8TextReader.cs (2)
407
XmlExceptionHelper.ThrowTokenExpected(this, "?>", Encoding.
UTF8
.GetString(buffer, offset, 2));
818
XmlExceptionHelper.ThrowTokenExpected(this, "[CDATA[", Encoding.
UTF8
.GetString(buffer, offset, 7));
System\Xml\XmlUTF8TextWriter.cs (2)
35
if (encoding.WebName != Encoding.
UTF8
.WebName)
128
if (encoding != null && encoding.CodePage == Encoding.
UTF8
.CodePage)
System.Security (2)
system\security\cryptography\xml\encryptedxml.cs (1)
124
m_encoding = Encoding.
UTF8
;
system\security\cryptography\xml\SignedXmlDebugLog.cs (1)
566
Encoding.
UTF8
.GetString(ms.ToArray()));
System.ServiceModel (37)
System\ServiceModel\Channels\BinaryMessageEncoder.cs (5)
487
int utf8ValueSize = Encoding.
UTF8
.GetByteCount(newStrings[i].Value);
518
int utf8ValueSize = Encoding.
UTF8
.GetByteCount(newString);
520
offset += Encoding.
UTF8
.GetBytes(newString, 0, newString.Length, buffer, offset);
592
string value = Encoding.
UTF8
.GetString(buffer, offset, utf8ValueSize);
1022
int bytesRequired = Encoding.
UTF8
.GetByteCount(s.Value);
System\ServiceModel\Channels\ConnectionOrientedTransportChannelListener.cs (1)
350
int encodedSize = Encoding.
UTF8
.GetByteCount(uri.AbsoluteUri);
System\ServiceModel\Channels\FramingDecoders.cs (1)
159
value = Encoding.
UTF8
.GetString(encodedBytes, 0, encodedSize);
System\ServiceModel\Channels\FramingEncoders.cs (2)
55
int valueByteCount = Encoding.
UTF8
.GetByteCount(value);
61
Encoding.
UTF8
.GetBytes(value, 0, value.Length, encodedBytes, offset);
System\ServiceModel\Channels\HttpChannelHelpers.cs (2)
325
action = UrlUtility.UrlDecode(action, Encoding.
UTF8
);
3746
return System.Text.Encoding.
UTF8
.GetString(responseBuffer, 0, bytesRead);
System\ServiceModel\Channels\PeerNodeImplementation.cs (1)
1675
int viaSize = Encoding.
UTF8
.GetByteCount(uri.OriginalString);
System\ServiceModel\Channels\PipeConnection.cs (1)
2806
byte[] canonicalBytes = Encoding.
UTF8
.GetBytes(canonicalName);
System\ServiceModel\Channels\PnrpPeerResolver.cs (1)
86
return System.Text.Encoding.
UTF8
;
System\ServiceModel\Channels\TransportDefaults.cs (2)
58
internal static readonly Encoding[] SupportedEncodings = new Encoding[] { Encoding.
UTF8
, Encoding.Unicode, Encoding.BigEndianUnicode };
62
new CharSetEncoding("utf-8", Encoding.
UTF8
),
System\ServiceModel\Channels\WebSocketHelper.cs (1)
55
byte[] bytes = Encoding.
UTF8
.GetBytes(fullString);
System\ServiceModel\ComIntegration\ComIntegrationManifestGenerator.cs (1)
174
byte[] bytes = System.Text.Encoding.
UTF8
.GetBytes(value);
System\ServiceModel\Configuration\IssuedTokenParametersElement.cs (1)
293
using (XmlTextWriter commentWriter = new XmlTextWriter(memoryStream, Encoding.
UTF8
))
System\ServiceModel\Diagnostics\MessageLogTraceRecord.cs (1)
56
this.messageString = System.Text.Encoding.
UTF8
.GetString(buffer.Array, buffer.Offset, buffer.Count);
System\ServiceModel\Security\InfoCardHelper.cs (1)
799
using (XmlWriter writer = new XmlTextWriter(buffer, Encoding.
UTF8
))
System\ServiceModel\Security\SecurityUtils.cs (1)
548
combinedHashLabel = Encoding.
UTF8
.GetBytes(TrustApr2004Strings.CombinedHashLabel);
System\ServiceModel\Security\Tokens\DerivedKeySecurityToken.cs (1)
261
(this.label != null ? Encoding.
UTF8
.GetBytes(this.label) : DefaultLabel), this.nonce, this.length * 8,
System\ServiceModel\Security\Tokens\IssuedSecurityTokenProvider.cs (1)
452
using (XmlDictionaryWriter xmlWriter = XmlDictionaryWriter.CreateTextWriter(stream, Encoding.
UTF8
, false))
System\ServiceModel\Security\WSSecurityPolicy.cs (2)
2293
writer = new XmlTextWriter(stream, System.Text.Encoding.
UTF8
);
2307
writer = new XmlTextWriter(stream, System.Text.Encoding.
UTF8
);
System\ServiceModel\Security\WSTrust.cs (1)
1413
using (XmlDictionaryWriter writer = XmlDictionaryWriter.CreateDictionaryWriter(new XmlTextWriter(stream, Encoding.
UTF8
)))
System\ServiceModel\Transactions\WsatProxy.cs (1)
431
byte[] descriptionBytes = Encoding.
UTF8
.GetBytes(description);
System\UriTemplate.cs (3)
193
key = UrlUtility.UrlDecode(key, Encoding.
UTF8
);
720
string escapedValue = (string.IsNullOrEmpty(value) ? string.Empty : UrlUtility.UrlEncode(value, Encoding.
UTF8
));
721
query.AppendFormat("&{0}={1}", UrlUtility.UrlEncode(key, Encoding.
UTF8
), escapedValue);
System\UriTemplateLiteralQueryValue.cs (3)
26
return new UriTemplateLiteralQueryValue(UrlUtility.UrlDecode(value, Encoding.
UTF8
));
31
return UrlUtility.UrlEncode(this.value, Encoding.
UTF8
);
39
query.AppendFormat("&{0}={1}", UrlUtility.UrlEncode(keyName, Encoding.
UTF8
), AsEscapedString());
System\UriTemplateQueryValue.cs (1)
91
query.AppendFormat("&{0}", UrlUtility.UrlEncode(keyName, Encoding.
UTF8
));
System\UriTemplateVariableQueryValue.cs (2)
31
query.AppendFormat("&{0}={1}", UrlUtility.UrlEncode(keyName, Encoding.
UTF8
), UrlUtility.UrlEncode(values[valueIndex++], Encoding.
UTF8
));
System.ServiceModel.Internals (4)
System\Runtime\UrlUtility.cs (4)
18
return ParseQueryString(query, Encoding.
UTF8
);
47
return UrlEncode(str, Encoding.
UTF8
);
66
return UrlEncodeSpaces(UrlEncodeNonAscii(str, Encoding.
UTF8
));
134
e = Encoding.
UTF8
;
System.ServiceModel.Web (9)
System\ServiceModel\Channels\WebScriptMetadataMessageEncoderFactory.cs (1)
47
this.innerReadMessageEncoder = new TextMessageEncodingBindingElement(MessageVersion.None, Encoding.
UTF8
).CreateMessageEncoderFactory().Encoder;
System\ServiceModel\Configuration\WebEncodingValidator.cs (1)
24
((encoding.WebName != Encoding.
UTF8
.WebName) &&
System\ServiceModel\Dispatcher\JsonQueryStringConverter.cs (4)
171
XmlDictionaryWriter jsonWriter = JsonReaderWriterFactory.CreateJsonWriter(memoryStream, Encoding.
UTF8
);
175
return Encoding.
UTF8
.GetString(memoryStream.GetBuffer(), (int) memoryStream.Position, (int) memoryStream.Length);
180
byte[] byteArray = Encoding.
UTF8
.GetBytes(parameter);
182
(byteArray, 0, byteArray.Length, Encoding.
UTF8
, XmlDictionaryReaderQuotas.Max, null);
System\ServiceModel\Web\WebOperationContext.cs (3)
214
return CreateTextResponse(text, WebOperationContext.DefaultTextMediaType, Encoding.
UTF8
);
219
return CreateTextResponse(text, contentType, Encoding.
UTF8
);
258
encoding = Encoding.
UTF8
;
System.Web (63)
Compilation\AssemblyBuilder.cs (2)
242
return new StreamWriter(temp, Encoding.
UTF8
);
1299
return new StreamWriter(temp, Encoding.
UTF8
);
Compilation\BuildManager.cs (1)
2626
using (StreamWriter writer = new StreamWriter(precompMarkerFile, false /*append*/, Encoding.
UTF8
)) {
Compilation\BuildResultCache.cs (1)
758
using (var writer = new StreamWriter(hashFilePath, false, Encoding.
UTF8
)) {
Compilation\PreservationFileWriter.cs (1)
37
_writer = new XmlTextWriter(preservationFile, Encoding.
UTF8
);
Configuration\GlobalizationSection.cs (9)
42
new ConfigurationProperty("requestEncoding", typeof(string), Encoding.
UTF8
.WebName, ConfigurationPropertyOptions.None);
44
new ConfigurationProperty("responseEncoding", typeof(string), Encoding.
UTF8
.WebName, ConfigurationPropertyOptions.None);
54
new ConfigurationProperty("responseHeaderEncoding", typeof(string), Encoding.
UTF8
.WebName, ConfigurationPropertyOptions.None);
96
requestEncodingCache = Encoding.
UTF8
;
107
requestEncodingCache = Encoding.
UTF8
;
116
responseEncodingCache = Encoding.
UTF8
;
126
responseEncodingCache = Encoding.
UTF8
;
135
responseHeaderEncodingCache = Encoding.
UTF8
;
146
responseHeaderEncodingCache = Encoding.
UTF8
;
Configuration\HttpRuntimeSection.cs (2)
842
string[] stringsDecoded = HttpUtility.UrlDecode(invalidCharString, Encoding.
UTF8
).Split(',');
866
string decodedString = HttpUtility.UrlDecode(stringsToDecode[iter], Encoding.
UTF8
).Trim();
ErrorFormatter.cs (1)
1870
get { return Encoding.
UTF8
; }
Hosting\ApplicationManager.cs (1)
1458
StreamReader reader = new StreamReader(file, Encoding.
UTF8
);
Hosting\IIS7WorkerRequest.cs (1)
46
private Encoding _headerEncoding = Encoding.
UTF8
;
Hosting\ISAPIWorkerRequest.cs (5)
93
s_ByteBufferAllocator = new UbyteBufferAllocator(Encoding.
UTF8
.GetMaxByteCount(BUFFER_SIZE), MAX_FREE_BUFFERS);
152
return GetEncodedBytesBuffer(Encoding.
UTF8
);
160
encoding = Encoding.
UTF8
;
1852
value = buf.GetDecodedString(Encoding.
UTF8
, retVal);
1884
_additionalServerVars[i] = buf.GetDecodedString(Encoding.
UTF8
, retVal);
HttpCachePolicy.cs (1)
746
_etag = Convert.ToBase64String(CryptoUtil.ComputeSHA256Hash(Encoding.
UTF8
.GetBytes(sb.ToString())));
HttpDebugHandler.cs (1)
209
HttpValueCollection valCol = new HttpValueCollection(s, true, true, Encoding.
UTF8
);
HttpRequest.cs (1)
1350
return e.Equals(Encoding.Unicode) ? Encoding.
UTF8
: e;
HttpResponse.cs (4)
1742
_headerEncoding = Encoding.
UTF8
;
1775
if (!e.Equals(Encoding.
UTF8
)) {
3329
return schemeAndAuthority + HttpEncoderUtility.UrlEncodeSpaces(HttpUtility.UrlEncodeNonAscii(path, Encoding.
UTF8
)) + queryAndFragment;
3333
return HttpEncoderUtility.UrlEncodeSpaces(HttpUtility.UrlEncodeNonAscii(url, Encoding.
UTF8
));
HttpRuntime.cs (1)
3244
StreamReader reader = new StreamReader(file, Encoding.
UTF8
);
httpserverutility.cs (7)
985
Encoding e = (_context != null) ? _context.Response.ContentEncoding : Encoding.
UTF8
;
1019
Encoding e = (_context != null) ? _context.Request.ContentEncoding : Encoding.
UTF8
;
1277
return ParseQueryString(query, Encoding.
UTF8
);
1313
return UrlEncode(str, Encoding.
UTF8
);
1380
return UrlEncodeToBytes(str, Encoding.
UTF8
);
1439
return UrlDecode(str, Encoding.
UTF8
);
1475
return UrlDecodeToBytes(str, Encoding.
UTF8
);
Security\AnonymousIdentificationModule.cs (3)
329
s_Modifier = Encoding.
UTF8
.GetBytes("AnonymousIdentification");
343
byte [] bufId = Encoding.
UTF8
.GetBytes(data.AnonymousId);
370
string id = Encoding.
UTF8
.GetString(bBlob, 12, len);
Security\AntiXss\AntiXssEncoder.cs (8)
41
string utf8String = Encoding.
UTF8
.GetString(bytes, offset, count);
42
string result = UrlEncode(utf8String, Encoding.
UTF8
);
43
return Encoding.
UTF8
.GetBytes(result);
64
return schemeAndAuthority + HtmlParameterEncoder.UrlPathEncode(path, Encoding.
UTF8
) + queryAndFragment;
91
return UrlEncode(input, Encoding.
UTF8
);
97
return HtmlFormUrlEncode(input, Encoding.
UTF8
);
117
inputEncoding = Encoding.
UTF8
;
128
inputEncoding = Encoding.
UTF8
;
Security\FormsAuthentication.cs (1)
76
return CryptoUtil.BinaryToHex(hashAlgorithm.ComputeHash(Encoding.
UTF8
.GetBytes(password)));
State\OutOfProcStateClientManager.cs (1)
108
string idHash = Convert.ToBase64String(CryptoUtil.ComputeSHA256Hash(Encoding.
UTF8
.GetBytes(appId)));
StringResourceManager.cs (3)
28
return new String((sbyte *)pv, offset, size, Encoding.
UTF8
);
100
size = Encoding.
UTF8
.GetByteCount(s);
118
Encoding encoding = Encoding.
UTF8
;
UI\HTMLTextWriter.cs (1)
1308
Write(HttpUtility.UrlEncodeNonAscii(Char.ToString(ch), Encoding.
UTF8
));
UI\Page.cs (2)
1863
return Encoding.
UTF8
.GetString(clearData);
2009
byte[] clearData = Encoding.
UTF8
.GetBytes(s);
UI\PageThemeParser.cs (1)
146
ParseString(Text, CurrentVirtualPath, Encoding.
UTF8
);
UI\TemplateParser.cs (1)
704
ParseString(_text, CurrentVirtualPath, Encoding.
UTF8
);
Util\HttpEncoder.cs (2)
677
e = Encoding.
UTF8
;
801
return HttpEncoderUtility.UrlEncodeSpaces(UrlEncodeNonAscii(value, Encoding.
UTF8
));
WebSockets\AspNetWebSocket.cs (1)
505
int byteCount = Encoding.
UTF8
.GetByteCount(statusDescription);
System.Web.DataVisualization (2)
WebForm\General\ChartHttpHandler.cs (2)
204
byte[] data = System.Text.Encoding.
UTF8
.GetBytes("chart io controller file");
1469
byte[] data = Encoding.
UTF8
.GetBytes(sessionID + "/" + currentGuid);
System.Web.Extensions (4)
ClientServices\Providers\ProxyHelper.cs (2)
134
return Encoding.
UTF8
.GetBytes(sb.ToString());
142
using (StreamReader readStream = new StreamReader(s, Encoding.
UTF8
)) {
Handlers\ScriptResourceHandler.cs (1)
519
using (StreamWriter writer = new StreamWriter(outputStream, Encoding.
UTF8
)) {
Script\Services\ServicesUtilities.cs (1)
116
using (XmlTextWriter writer = new XmlTextWriter(ms, Encoding.
UTF8
)) {
System.Web.Mobile (1)
UI\MobileControls\Adapters\EmptyTextWriter.cs (1)
330
return Encoding.
UTF8
;
System.Web.Services (11)
System\Web\Services\Discovery\DiscoveryRequestHandler.cs (1)
108
context.Response.ContentType = ContentType.Compose("text/xml", Encoding.
UTF8
);
System\Web\Services\Protocols\DiscoveryServerProtocol.cs (1)
341
Response.ContentType = ContentType.Compose("text/plain", Encoding.
UTF8
);
System\Web\Services\Protocols\HttpServerProtocol.cs (2)
167
string utf8MethodName = Encoding.
UTF8
.GetString(Encoding.Default.GetBytes(methodName));
222
Response.ContentType = ContentType.Compose("text/plain", Encoding.
UTF8
);
System\Web\Services\Protocols\LogicalMethodInfo.cs (1)
558
byte[] bytes = HashAlgorithm.ComputeHash(Encoding.
UTF8
.GetBytes(key));
System\Web\Services\Protocols\SoapClientProtocol.cs (3)
518
string soapAction = UrlEncoder.EscapeString(method.action, Encoding.
UTF8
);
521
message.ContentType = ContentType.Compose(ContentType.ApplicationSoap, RequestEncoding != null ? RequestEncoding : Encoding.
UTF8
, soapAction);
523
message.ContentType = ContentType.Compose(ContentType.TextXml, RequestEncoding != null ? RequestEncoding : Encoding.
UTF8
);
System\Web\Services\Protocols\SoapServerProtocol.cs (3)
677
message.ContentType = ContentType.Compose(helper.HttpContentType, Encoding.
UTF8
);
765
message.ContentType = ContentType.Compose(helper.HttpContentType, Encoding.
UTF8
);
814
Response.ContentType = ContentType.Compose(ContentType.TextPlain, Encoding.
UTF8
);
System.Windows.Forms (16)
parent\parent\parent\public\Internal\NDP\Inc\mansign.cs (5)
521
byte[] licenseXml = Encoding.
UTF8
.GetBytes(licenseNode.OuterXml);
718
byte[] modulus = Encoding.
UTF8
.GetBytes(snModulus.InnerXml);
719
byte[] exponent = Encoding.
UTF8
.GetBytes(snExponent.InnerXml);
1028
byte[] licenseXml = Encoding.
UTF8
.GetBytes(licenseDom.OuterXml);
1049
asTimestamp.InnerText = Encoding.
UTF8
.GetString(timestampSignature);
parent\parent\parent\public\Internal\NDP\Inc\mansign2.cs (5)
266
byte[] licenseXml = Encoding.
UTF8
.GetBytes(licenseNode.OuterXml);
1344
byte[] modulus = Encoding.
UTF8
.GetBytes(snModulus.InnerXml);
1345
byte[] exponent = Encoding.
UTF8
.GetBytes(snExponent.InnerXml);
1856
byte[] licenseXml = Encoding.
UTF8
.GetBytes(licenseDom.OuterXml);
1878
timestamp = Encoding.
UTF8
.GetString(timestampSignature);
winforms\Managed\System\Resources\ResXResourceWriter.cs (2)
311
xmlTextWriter = new XmlTextWriter(stream, System.Text.Encoding.
UTF8
);
315
xmlTextWriter = new XmlTextWriter(fileName, System.Text.Encoding.
UTF8
);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (2)
8217
byte[] destinationBytes = Encoding.Convert(Encoding.Unicode, Encoding.
UTF8
, sourceBytes);
8228
destinationBytes = Encoding.Convert(Encoding.Unicode, Encoding.
UTF8
, sourceBytes);
winforms\Managed\System\WinForms\DataObject.cs (1)
1899
stringData = Encoding.
UTF8
.GetString(bytes);
winforms\Managed\System\WinForms\WebBrowser.cs (1)
350
StreamWriter sw = new StreamWriter(ms, Encoding.
UTF8
);
System.Workflow.ComponentModel (2)
AuthoringOM\Compiler\CompileXomlTask.cs (1)
630
using (StreamWriter fileStream = new StreamWriter(new FileStream(tempFile, FileMode.Create, FileAccess.Write), Encoding.
UTF8
))
AuthoringOM\Compiler\XomlCompilerHelpers.cs (1)
711
using (StreamWriter sw = new StreamWriter(temp, Encoding.
UTF8
))
System.WorkflowServices (1)
System\ServiceModel\Persistence\SqlPersistenceProviderFactory.cs (1)
523
string xml = UnicodeEncoding.
UTF8
.GetString(memStr.ToArray());
System.Xml (3)
System\Xml\Core\XmlTextReaderImpl.cs (1)
2942
ps.encoding = Encoding.
UTF8
;
System\Xml\Core\XmlWriterSettings.cs (2)
498
Debug.Assert(Encoding.
UTF8
.WebName == "utf-8");
674
encoding = Encoding.
UTF8
;
WindowsBase (24)
Base\MS\Internal\IO\Packaging\CompoundFile\RightsManagementEncryptionTransform.cs (14)
143
BinaryReader utf8Reader = new BinaryReader(_publishLicenseStream, Encoding.
UTF8
);
192
Encoding.
UTF8
,
252
BinaryWriter utf8Writer = new BinaryWriter(_publishLicenseStream, Encoding.
UTF8
);
286
WriteByteLengthPrefixedDwordPaddedString(publishLicense.ToString(), utf8Writer, Encoding.
UTF8
);
760
string base64UserName = ReadLengthPrefixedString(utf8Reader, Encoding.
UTF8
, UserNameLengthMax);
783
ReadLengthPrefixedString(utf8Reader, Encoding.
UTF8
, UseLicenseLengthMax)
826
using (BinaryReader utf8Reader = new BinaryReader(stream, Encoding.
UTF8
))
879
using (BinaryReader utf8Reader = new BinaryReader(stream, Encoding.
UTF8
))
922
using (BinaryWriter utf8Writer = new BinaryWriter(licenseStream, Encoding.
UTF8
))
940
byte [] utf8Bytes = Encoding.
UTF8
.GetBytes(base64UserName);
963
WriteByteLengthPrefixedDwordPaddedString(useLicense.ToString(), utf8Writer, Encoding.
UTF8
);
1214
ReadLengthPrefixedString(utf8Reader, Encoding.
UTF8
, UserNameLengthMax);
1217
ReadLengthPrefixedString(utf8Reader, Encoding.
UTF8
, UseLicenseLengthMax)
1246
string base64UserName = ReadLengthPrefixedString(utf8Reader, Encoding.
UTF8
, UserNameLengthMax);
Base\MS\Internal\IO\Packaging\InternalRelationshipCollection.cs (2)
520
using (XmlTextWriter writer = new XmlTextWriter(s, System.Text.Encoding.
UTF8
))
782
_streamingXmlWriter = new XmlTextWriter(s, System.Text.Encoding.
UTF8
);
Base\MS\Internal\IO\Packaging\PartBasedPackageProperties.cs (1)
776
_xmlWriter = new XmlTextWriter(writerStream, System.Text.Encoding.
UTF8
);
Base\MS\Internal\IO\Packaging\StorageBasedPackageProperties.cs (2)
589
obj = UTF8Encoding.
UTF8
.GetString(byteArray);
727
byte[] byteArray = UTF8Encoding.
UTF8
.GetBytes(inputString);
Base\MS\Internal\IO\Packaging\XmlDigitalSignatureProcessor.cs (2)
547
System.Text.Encoding.
UTF8
))
1001
using (XmlTextWriter xWriter = new XmlTextWriter(s, System.Text.Encoding.
UTF8
))
Base\System\IO\Packaging\ZipPackage.cs (2)
1047
using (XmlTextWriter writer = new XmlTextWriter(s, System.Text.Encoding.
UTF8
))
1501
_streamingXmlWriter = new XmlTextWriter(s, System.Text.Encoding.
UTF8
);
Shared\MS\Internal\IO\Packaging\PackagingUtilities.cs (1)
861
private static readonly string _webNameUTF8 = Encoding.
UTF8
.WebName.ToUpperInvariant();
WsatConfig (1)
CommandLine\ConsoleEntryPoint.cs (1)
258
if ((System.Console.OutputEncoding.CodePage != Encoding.
UTF8
.CodePage) &&