Unicode 文字列をバイト配列に変換します。
名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文
'宣言
Public Shared Function UrlEncodeUnicodeToBytes ( _
str As String _
) As Byte()
'使用
Dim str As String
Dim returnValue As Byte()
returnValue = HttpUtility.UrlEncodeUnicodeToBytes(str)
public static byte[] UrlEncodeUnicodeToBytes (
string str
)
public:
static array<unsigned char>^ UrlEncodeUnicodeToBytes (
String^ str
)
public static byte[] UrlEncodeUnicodeToBytes (
String str
)
public static function UrlEncodeUnicodeToBytes (
str : String
) : byte[]
適用できません。
パラメータ
- str
変換する文字列。
戻り値
バイト配列。
解説
空白や区切り記号などの文字が HTTP ストリームで渡される場合、それらの文字は受信側で誤って解釈される可能性があります。URL エンコーディングは、URL では使用できない文字を等価の文字エンティティに変換します。URL デコーディングはエンコーディングの逆の変換を行います。たとえば、URL で送信されるテキスト ブロックに < および > という文字が埋め込まれている場合、それらの文字は %3c および %3e としてエンコードされます。
プラットフォーム
Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition
Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。
バージョン情報
.NET Framework
サポート対象 : 3.0,2.0,1.1,1.0
参照
関連項目
HttpUtility クラス
HttpUtility メンバ
System.Web 名前空間