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 編碼會將 URL 中不正確字元轉換為字元實體對應項;URL 解碼會反轉編碼。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.

適用於

另請參閱