CODEPAGE=932, ソースコード=shift_jis, 出力=shift_jis |
|
HTTPヘッダ : Content-Type: text/html; charset=shift_jis
|
<% @Page CodePage="932" %>
<SCRIPT language="VB" runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim sjis As String = ""
Response.Charset = "shift_jis"
if Request.QueryString("value") = "送信" then
sjis = "送信を受信しました"
end if
Response.Write( sjis )
End Sub
</SCRIPT>
| |
|
|
<% @Page CodePage="932" %>
<SCRIPT language="VB" runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Response.Write( Server.UrlEncode("送信") & "<br>" )
Response.Write( Server.UrlEncode(Request.QueryString("value")) & "<br>" )
End Sub
</SCRIPT>
| |
|
|
CODEPAGE=65001, ソースコード=shift_jis, 出力=utf-8 |
|
HTTPヘッダ : Content-Type: text/html; charset=utf-8
|
<% @Page CodePage="65001" %>
<SCRIPT language="VB" runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim utf8 As String = ""
if Request.QueryString("value") = "送信" then
utf8 = "送信を受信しました"
end if
Response.Write( utf8 )
End Sub
</SCRIPT>
| |
|
|
CODEPAGE=65001, ソースコード=shift_jis, 出力=euc-jp |
|
HTTPヘッダ : Content-Type: text/html; charset=euc-jp
|
<% @Page CodePage="65001" %>
<SCRIPT language="VB" runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Response.Charset = "euc-jp"
Dim utf8Encoding As Encoding = Encoding.UTF8
Dim ujisEncoding As Encoding = Encoding.GetEncoding( 51932 )
Dim utf8Bytes As Byte() = utf8Encoding.GetBytes("")
Dim ujisBytes As Byte() = ujisEncoding.GetBytes("")
if Request.QueryString("value") = "送信" then
utf8Bytes = utf8Encoding.GetBytes("送信を受信しました")
ujisBytes = Encoding.Convert( utf8Encoding, ujisEncoding, utf8Bytes )
end if
Response.BinaryWrite( ujisBytes )
End Sub
</SCRIPT>
| |
|
|
|