You've already forked linux-packaging-mono
Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
parent
8016999e4d
commit
64ac736ec5
34
mcs/class/corlib/System.Text/EncodingHelper.WebAssembly.cs
Normal file
34
mcs/class/corlib/System.Text/EncodingHelper.WebAssembly.cs
Normal file
@ -0,0 +1,34 @@
|
||||
#if WASM
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.Text {
|
||||
|
||||
internal static partial class EncodingHelper {
|
||||
|
||||
static volatile Encoding utf8Encoding;
|
||||
|
||||
internal static Encoding UTF8 {
|
||||
get {
|
||||
if (utf8Encoding == null) {
|
||||
lock (lockobj){
|
||||
if (utf8Encoding == null){
|
||||
utf8Encoding = new UTF8Encoding (true, false);
|
||||
utf8Encoding.setReadOnly ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return utf8Encoding;
|
||||
}
|
||||
}
|
||||
|
||||
// The mobile profile has been default'ing to UTF8 since it's creation
|
||||
internal static Encoding GetDefaultEncoding ()
|
||||
{
|
||||
return UTF8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user