掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
Shift-Jisの2バイトコードを取得するには? (ID:142553)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
Module A Sub Main() Test( "亜"c ) Test( "C"c ) End Sub Sub Test(ByVal c As Char) MsgBox( String.Format("SJIS=[{0:X4}], Unicode=[{1:x}]", CShort(Asc(c)), AscW(c)), vbInformation, c) MsgBox( CShort(Asc(c)).ToString("x4"), vbInformation, c ) MsgBox( CShort(Asc(c)).ToString("x"), vbInformation, c ) MsgBox( Right("0000" & Hex(CShort(Asc(c))), 4), vbInformation, c ) MsgBox( Hex(CShort(Asc(c))), vbInformation, c ) MsgBox( String.Format("{0:x4}", Asc(c) And &HFFFF), vbInformation, c ) MsgBox( (Asc(c) And &HFFFF).ToString("X4"), vbInformation, c ) MsgBox( Hex(Asc(c) And &HFFFF), vbInformation, c ) End Sub End Module
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.