HttpUtility.UrlEncodeUnicodeToBytes(String) 方法

定义

注意

This method produces non-standards-compliant output and has interoperability issues. The preferred alternative is UrlEncodeToBytes(String).

将 Unicode 字符串转换为字节数组。

public:
 static cli::array <System::Byte> ^ UrlEncodeUnicodeToBytes(System::String ^ str);
[System.Obsolete("This method produces non-standards-compliant output and has interoperability issues. The preferred alternative is UrlEncodeToBytes(String).")]
public static byte[]? UrlEncodeUnicodeToBytes(string? str);
public static byte[]? UrlEncodeUnicodeToBytes(string? str);
[System.Obsolete("This method produces non-standards-compliant output and has interoperability issues. The preferred alternative is UrlEncodeToBytes(String).")]
public static byte[] UrlEncodeUnicodeToBytes(string str);
public static byte[] UrlEncodeUnicodeToBytes(string str);
[<System.Obsolete("This method produces non-standards-compliant output and has interoperability issues. The preferred alternative is UrlEncodeToBytes(String).")>]
static member UrlEncodeUnicodeToBytes : string -> byte[]
static member UrlEncodeUnicodeToBytes : string -> byte[]
Public Shared Function UrlEncodeUnicodeToBytes (str As String) As Byte()

参数

str
String

要转换的字符串。

返回

Byte[]

字节数组。

属性

注解

如果在 HTTP 流中传递空白和标点符号等字符,则它们可能会在接收端被误解。 URL 编码将 URL 中无效的字符转换为字符实体等效项;URL 解码会反转编码。 例如,当嵌入在 URL 中传输的文本块中时,字符 < 和 > 编码为 %3c 和 %3e。

适用于

另请参阅