共用方式為


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。

適用於

另請參閱