From 7e219ff16eca1b4cd94102300ed4fceb3d780c63 Mon Sep 17 00:00:00 2001
From: Next Turn <45985406+NextTurn@users.noreply.github.com>
Date: Thu, 14 May 2020 14:53:58 +0800
Subject: [PATCH 1/2] Update Marshal.PtrToStringAnsi - UTF-8 on Unix
---
xml/System.Runtime.InteropServices/Marshal.xml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/xml/System.Runtime.InteropServices/Marshal.xml b/xml/System.Runtime.InteropServices/Marshal.xml
index 064345af4ce..7000fa7b6a1 100644
--- a/xml/System.Runtime.InteropServices/Marshal.xml
+++ b/xml/System.Runtime.InteropServices/Marshal.xml
@@ -6168,7 +6168,7 @@ There is a difference in the behavior of the `GetLastWin32Error` method on .NET
4.2.0.0
- Allocates a managed and copies all or part of an unmanaged ANSI string into it.
+ Allocates a managed and copies all or part of an unmanaged ANSI (on Windows) or UTF-8 (on Unix) string into it.
@@ -6216,8 +6216,8 @@ There is a difference in the behavior of the `GetLastWin32Error` method on .NET
The address of the first character of the unmanaged string.
- Copies all characters up to the first null character from an unmanaged ANSI string to a managed , and widens each ANSI character to Unicode.
- A managed string that holds a copy of the unmanaged ANSI string. If is , the method returns a null string.
+ Copies all characters up to the first null character from an unmanaged ANSI or UTF-8 string to a managed , and widens each character to Unicode.
+ A managed string that holds a copy of the unmanaged string. If is , the method returns a null string.
The address of the first character of the unmanaged string.
The byte count of the input string to copy.
- Allocates a managed , copies a specified number of characters from an unmanaged ANSI string into it, and widens each ANSI character to Unicode.
- A managed string that holds a copy of the native ANSI string if the value of the parameter is not ; otherwise, this method returns .
+ Allocates a managed , copies a specified number of characters from an unmanaged ANSI or UTF-8 string into it, and widens each character to Unicode.
+ A managed string that holds a copy of the native string if the value of the parameter is not ; otherwise, this method returns .
Date: Tue, 23 Jun 2020 11:55:34 +0800
Subject: [PATCH 2/2] Change mentions of Unicode to UTF-16
---
xml/System.Runtime.InteropServices/Marshal.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xml/System.Runtime.InteropServices/Marshal.xml b/xml/System.Runtime.InteropServices/Marshal.xml
index 7000fa7b6a1..0efdbf9fdbe 100644
--- a/xml/System.Runtime.InteropServices/Marshal.xml
+++ b/xml/System.Runtime.InteropServices/Marshal.xml
@@ -6216,7 +6216,7 @@ There is a difference in the behavior of the `GetLastWin32Error` method on .NET
The address of the first character of the unmanaged string.
- Copies all characters up to the first null character from an unmanaged ANSI or UTF-8 string to a managed , and widens each character to Unicode.
+ Copies all characters up to the first null character from an unmanaged ANSI or UTF-8 string to a managed , and widens each character to UTF-16.
A managed string that holds a copy of the unmanaged string. If is , the method returns a null string.
The address of the first character of the unmanaged string.
The byte count of the input string to copy.
- Allocates a managed , copies a specified number of characters from an unmanaged ANSI or UTF-8 string into it, and widens each character to Unicode.
+ Allocates a managed , copies a specified number of characters from an unmanaged ANSI or UTF-8 string into it, and widens each character to UTF-16.
A managed string that holds a copy of the native string if the value of the parameter is not ; otherwise, this method returns .