HttpUtility.UrlEncodeUnicode(String) HttpUtility.UrlEncodeUnicode(String) HttpUtility.UrlEncodeUnicode(String) HttpUtility.UrlEncodeUnicode(String) Method

定義

警告

此 API 現已淘汰。

將字串轉換成 Unicode 字串。 Converts a string into a Unicode string.

public:
 static System::String ^ UrlEncodeUnicode(System::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);
static member UrlEncodeUnicode : string -> string
Public Shared Function UrlEncodeUnicode (str As String) As String
參數
str
String String String String

要轉換的字串。 The string to convert.

傳回

採用 %UnicodeValue 標記法的 Unicode 字串。 A Unicode string in %UnicodeValue notation.

備註

如果空白和標點符號之類的字元傳遞到 HTTP 資料流,它們可能錯誤地解譯接收方。If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. 不是有效的 url 對等的字元實體,以將字元編碼的 URLURL 解碼反轉的編碼方式。URL encoding converts characters that are not valid in a URL to character-entity equivalents; URL decoding reverses the encoding. 例如,當內嵌在 URL 中,字元在要傳送的文字區塊<和 > 編碼為 %3c 和 %3e。For example, when embedded in a block of text to be transmitted in a URL, the characters < and > are encoded as %3c and %3e.

適用於

另請參閱