Change Auto charset to mean UTF-8 off-Windows (#23664)
authorJeremy Koritzinsky <jkoritzinsky@gmail.com>
Wed, 3 Apr 2019 21:08:06 +0000 (14:08 -0700)
committerGitHub <noreply@github.com>
Wed, 3 Apr 2019 21:08:06 +0000 (14:08 -0700)
commit0164d68225520d2292de144e69d8187ef9768be5
tree9d295d48265b9a3dbfc69d28538575446cc3d1e7
parent4758dd12887a97daa4cf6acd34a11fc27c4c26fc
Change Auto charset to mean UTF-8 off-Windows (#23664)

Match Mono's behavior by changing the Auto character set to mean UTF-8 on non-Windows platforms (new behavior) and UCS-2/UTF-16 on Windows (current behavior).

Fixes #23464
Fixes dotnet/corefx#32442

Impact of breaking change: It is highly unlikely that anyone is actively using current behavior since it is inconsistent with Mono and doesn't match any native system APIs on non-Windows platforms (they're all UTF-8 based).

We will need to update our documentation to reflect this updated behavior.
src/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.Unix.cs
src/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.Windows.cs
src/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.cs
src/vm/dllimport.cpp
src/vm/methodtablebuilder.cpp
tests/CoreFX/CoreFX.issues.json
tests/src/Interop/PInvoke/ExactSpelling/ExactSpellingTest.cs
tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsLayoutSeq.cs
tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.cpp
tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.h
tests/src/Interop/StructMarshalling/PInvoke/Struct.cs