將字串轉換為 Unicode 字串。
命名空間: System.Web
組件: System.Web (在 system.web.dll 中)
Public Shared Function UrlEncodeUnicode ( _
str As String _
) As String
Dim str As String
Dim returnValue As String
returnValue = HttpUtility.UrlEncodeUnicode(str)
public static string UrlEncodeUnicode (
string str
)
public:
static String^ UrlEncodeUnicode (
String^ str
)
public static String UrlEncodeUnicode (
String str
)
public static function UrlEncodeUnicode (
str : String
) : String
參數
- str
要轉換的字串。
傳回值
採用 %UnicodeValue 標記法的 Unicode 字串。
如果空白或標點符號之類的字元被傳入 HTTP 資料流,在接收端可能無法正確解譯它們。URL 編碼方式會將 URL 中無效的字元轉換為對等的字元實體;URL 解碼方式會復原該編碼方式。例如,當嵌入至文字區塊中以便在 URL 中傳輸時,‹ 和 › 字元會編碼為 %3c 和 %3d。
Windows 98、 Windows 2000 SP4、 Windows Server 2003、 Windows XP Media Center Edition、 Windows XP Professional x64 Edition、 Windows XP SP2、 Windows XP Starter Edition
.NET Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱系統需求一節的內容。
.NET Framework
支援版本:2.0、1.1、1.0