126 references to UTF8Encoding
dotnet-svcutil-lib (9)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (3)
3236return new UTF8Encoding(true, true); 3321newEncoding = new UTF8Encoding(true, true); 3387SwitchEncoding(new UTF8Encoding(true, true));
FrameworkFork\System.Runtime.Serialization\System\Xml\EncodingStreamWrapper.cs (2)
23private static readonly UTF8Encoding s_safeUTF8 = new UTF8Encoding(false, false); 26private static readonly UTF8Encoding s_validatingUTF8 = new UTF8Encoding(false, true);
FrameworkFork\System.Runtime.Serialization\System\Xml\ValueHandle.cs (1)
693UTF8Encoding encoding = new UTF8Encoding(false, true);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (1)
55s_utf8Encoding = new UTF8Encoding(false, true);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlExceptionHelper.cs (1)
274return CreateEncodingException(new System.Text.UTF8Encoding(false, false).GetString(buffer, offset, count), exception);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlStreamNodeWriter.cs (1)
24private static UTF8Encoding s_UTF8Encoding = new UTF8Encoding(false, true);
GenerateDocumentationAndConfigFiles (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
GetDocument.Insider (1)
Commands\GetDocumentCommandWorker.cs (1)
34= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
http2cat (2)
src\Shared\Http2cat\Http2Utilities.cs (1)
34private static readonly Encoding HeaderValueEncoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
97new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetByteCount(value);
IIS.FunctionalTests (2)
src\Shared\Http2cat\Http2Utilities.cs (1)
34private static readonly Encoding HeaderValueEncoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
97new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetByteCount(value);
IIS.LongTests (2)
src\Shared\Http2cat\Http2Utilities.cs (1)
34private static readonly Encoding HeaderValueEncoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
97new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetByteCount(value);
IIS.NewHandler.FunctionalTests (2)
src\Shared\Http2cat\Http2Utilities.cs (1)
34private static readonly Encoding HeaderValueEncoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
97new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetByteCount(value);
IIS.NewShim.FunctionalTests (2)
src\Shared\Http2cat\Http2Utilities.cs (1)
34private static readonly Encoding HeaderValueEncoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
97new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetByteCount(value);
IIS.ShadowCopy.Tests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
97new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetByteCount(value);
IISExpress.FunctionalTests (2)
src\Shared\Http2cat\Http2Utilities.cs (1)
34private static readonly Encoding HeaderValueEncoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
97new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetByteCount(value);
Metrics (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Metrics.Legacy (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.AspNetCore.DataProtection (1)
src\DataProtection\shared\src\EncodingUtil.cs (1)
11public static readonly UTF8Encoding SecureUtf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.AspNetCore.DataProtection.Abstractions (1)
src\DataProtection\shared\src\EncodingUtil.cs (1)
11public static readonly UTF8Encoding SecureUtf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.AspNetCore.DataProtection.Extensions (1)
src\DataProtection\shared\src\EncodingUtil.cs (1)
11public static readonly UTF8Encoding SecureUtf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.AspNetCore.Diagnostics (1)
src\Shared\RazorViews\BaseView.cs (1)
21private static readonly Encoding UTF8NoBOM = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
src\Shared\RazorViews\BaseView.cs (1)
21private static readonly Encoding UTF8NoBOM = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.AspNetCore.Hosting (1)
src\Shared\RazorViews\BaseView.cs (1)
21private static readonly Encoding UTF8NoBOM = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.AspNetCore.Identity (1)
DataProtectorTokenProvider.cs (1)
198internal static readonly Encoding DefaultEncoding = new UTF8Encoding(false, true);
Microsoft.AspNetCore.Identity.FunctionalTests (1)
src\Identity\Extensions.Core\src\Rfc6238AuthenticationService.cs (1)
18private static readonly Encoding _encoding = new UTF8Encoding(false, true);
Microsoft.AspNetCore.Mvc.Core (1)
Formatters\TextInputFormatter.cs (1)
19= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (1)
SnapshotTestHelper.cs (1)
199var encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.AspNetCore.Server.HttpSys (2)
src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (1)
17private static readonly Encoding UTF8 = new UTF8Encoding(
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
97new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetByteCount(value);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\Http2cat\Http2Utilities.cs (1)
34private static readonly Encoding HeaderValueEncoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.AspNetCore.Server.IIS (3)
src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (1)
17private static readonly Encoding UTF8 = new UTF8Encoding(
src\Shared\RazorViews\BaseView.cs (1)
21private static readonly Encoding UTF8NoBOM = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
97new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetByteCount(value);
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Infrastructure\HttpUtilities.cs (1)
30private static readonly UTF8Encoding DefaultRequestHeaderEncoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
97new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetByteCount(value);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
97new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetByteCount(value);
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (1)
17private static readonly Encoding UTF8 = new UTF8Encoding(
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
97new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetByteCount(value);
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\GenerateMSBuildEditorConfig.cs (1)
125var encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Core\MSBuildTask\GenerateMSBuildEditorConfig.cs (1)
125var encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.Build.Tasks.Core (2)
FileIO\WriteLinesToFile.cs (1)
22private static readonly Encoding s_defaultEncoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
StreamMappedString.cs (1)
121Encoding utf8Encoding = new UTF8Encoding(false, true /* throw on illegal bytes */);
Microsoft.CodeAnalysis (4)
EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Text\SourceText.cs (1)
48private static readonly Encoding s_utf8EncodingWithNoBOM = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: false);
Text\SourceTextStream.cs (1)
29private static readonly Encoding s_utf8EncodingWithNoBOM = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: false);
Microsoft.CodeAnalysis.Analyzers (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.CodeAnalysis.CodeStyle (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.CodeAnalysis.CSharp (3)
Compiler\DocumentationCommentCompiler.cs (1)
94encoding: new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: false),
Symbols\FileIdentifier.cs (1)
22private static readonly Encoding s_encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Utilities\InterceptableLocation.cs (1)
54private static readonly UTF8Encoding s_encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
PDB\PDBTests.cs (4)
67var tree3 = SyntaxFactory.ParseSyntaxTree("class C { public void F() { } }", encoding: new UTF8Encoding(true, false), path: "Bar.cs"); 68var tree4 = SyntaxFactory.ParseSyntaxTree(SourceText.From("class D { public void F() { } }", new UTF8Encoding(false, false)), path: "Baz.cs"); 77var hash3 = CryptographicHashProvider.ComputeSha1(new UTF8Encoding(true, false).GetBytesWithPreamble(tree3.ToString())).ToArray(); 78var hash4 = CryptographicHashProvider.ComputeSha1(new UTF8Encoding(false, false).GetBytesWithPreamble(tree4.ToString())).ToArray();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\AttributeTests_Assembly.cs (1)
353var utf8 = new System.Text.UTF8Encoding(false, false);
Microsoft.CodeAnalysis.EditorFeatures (1)
Workspaces\EditorTextFactoryService.cs (1)
30private static readonly Encoding s_throwingUtf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Workspaces\TextFactoryTests.cs (3)
46expectedEncoding: new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true)); 57new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetBytes("Test"), 72.. new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true).GetBytes("Test"),
Microsoft.CodeAnalysis.Extensions.Package (1)
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.CodeAnalysis.UnitTests (2)
Text\StringTextDecodingTests.cs (2)
154var utf8 = new UTF8Encoding(false, true); 188var utf8 = new UTF8Encoding(false, true);
Microsoft.CodeAnalysis.VisualBasic (1)
Compilation\DocumentationComments\DocumentationCommentCompiler.vb (1)
71writer = New StreamWriter(xmlDocStream, New UTF8Encoding(True, False), bufferSize:=&H400, leaveOpen:=True)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (4)
PDB\PDBTests.vb (4)
44Dim tree3 = SyntaxFactory.ParseSyntaxTree("Class C" & vbCrLf & "Sub F() : End Sub : End Class", path:="Bar.vb", encoding:=New UTF8Encoding(True, False)) 45Dim tree4 = SyntaxFactory.ParseSyntaxTree(SourceText.From("Class D" & vbCrLf & "Sub F() : End Sub : End Class", New UTF8Encoding(False, False)), path:="Baz.vb") 54Dim hash3 = CryptographicHashProvider.ComputeSha1(New UTF8Encoding(True, False).GetBytesWithPreamble(tree3.ToString())).ToArray() 55Dim hash4 = CryptographicHashProvider.ComputeSha1(New UTF8Encoding(False, False).GetBytesWithPreamble(tree4.ToString())).ToArray()
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
VisualStudioMSBuildWorkspaceTests.cs (3)
2779Assert.Equal(new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true), text.Encoding); 2798Assert.Equal(new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true), text.Encoding); 2817Assert.Equal(new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true), text.Encoding);
Microsoft.Extensions.Caching.Hybrid (1)
Internal\HybridCachePayload.cs (1)
59public static UTF8Encoding Encoding { get; } = new(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: false);
Microsoft.Extensions.Identity.Core (1)
Rfc6238AuthenticationService.cs (1)
18private static readonly Encoding _encoding = new UTF8Encoding(false, true);
Roslyn.Diagnostics.Analyzers (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
System.Formats.Asn1 (2)
System\Formats\Asn1\AsnCharacterStringEncodings.cs (2)
14private static readonly UTF8Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true); 420private static readonly UTF8Encoding s_utf8Encoding = new UTF8Encoding(false, throwOnInvalidBytes: true);
System.Formats.Cbor (2)
System\Formats\Cbor\CborConformanceLevel.cs (2)
54private static readonly UTF8Encoding s_utf8EncodingLax = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: false); 55private static readonly UTF8Encoding s_utf8EncodingStrict = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
System.Formats.Nrbf (1)
System\Formats\Nrbf\NrbfDecoder.cs (1)
25private static UTF8Encoding ThrowOnInvalidUtf8Encoding { get; } = new(false, throwOnInvalidBytes: true);
System.Net.HttpListener (1)
System\Net\HttpListenerRequestUriBuilder.cs (1)
18private static readonly UTF8Encoding s_utf8Encoding = new UTF8Encoding(false, true);
System.Net.WebSockets (1)
System\Net\WebSockets\ManagedWebSocket.cs (1)
33private static readonly UTF8Encoding s_textEncoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\IO\EncodingCache.cs (1)
10internal static readonly Encoding UTF8NoBOM = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (1)
26private static Encoding UTF8NoBOM => s_UTF8NoBOM ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\DataContractSerializer.cs (2)
36internal static UTF8Encoding UTF8NoBom { get; } = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: false); 37internal static UTF8Encoding ValidatingUTF8 { get; } = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
System\Xml\XmlExceptionHelper.cs (1)
316return CreateEncodingException(new System.Text.UTF8Encoding(false, false).GetString(buffer, offset, count), exception);
System.Private.Xml (3)
System\Xml\Core\XmlTextReaderImpl.cs (2)
22s_utf8BomThrowing ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: true, throwOnInvalidBytes: true); 3161return new UTF8Encoding(true, true);
System\Xml\Core\XmlTextReaderImplAsync.cs (1)
1015return SwitchEncodingAsync(new UTF8Encoding(true, true));
System.Security.Cryptography (2)
src\libraries\Common\src\System\Security\Cryptography\Utf8DataEncoding.cs (1)
10internal static Encoding ThrowingUtf8Encoding { get; } = new UTF8Encoding(false, true);
System\Security\Cryptography\Rfc2898DeriveBytes.OneShot.cs (1)
13private static readonly UTF8Encoding s_throwingUtf8Encoding = new UTF8Encoding(false, true);
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHelpers.cs (1)
19private static readonly UTF8Encoding s_utf8EncodingStrict = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
System.Text.Json (1)
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (1)
39public static readonly UTF8Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
System.Xaml (1)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (1)
734return new System.Text.UTF8Encoding(true, true);
Test.Utilities (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
Text.Analyzers (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
20private static readonly Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
249s_lazyUtf8 ??= new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true);