HttpUtility.UrlEncodeUnicode(String) 方法

定义

注意

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

将字符串转换为 Unicode 字符串。

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

参数

str
String

要转换的字符串。

返回

采用 %UnicodeValue 表示法的 Unicode 字符串。

属性

注解

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

适用于

另请参阅