★WSHでCGI★JScriptVBScriptat PHP★WSHでCGI★JScriptVBScript - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト55:1 05/04/12 17:41:14 Option Explicit '●エンコード文字列分解の正規表現 Private ObjRgExDecode Set ObjRgExDecode=New RegExp With ObjRgExDecode .Global=true .Pattern="%[0-9A-F][0-9A-F]|." .IgnoreCase=true End With 56:1 05/04/12 17:43:48 '●シフトJISデコード sc;エンコード文字列 Public Function PF_Decode(ByVal sc) Dim ms,d0,d1,d2,d3,d,s On Error Resume Next sc=replace(sc,"+"," ",1,-1,1) Set ms=ObjRgExDecode.Execute(sc) d0="" 57:1 05/04/12 17:45:51 For Each d1 in ms d2=split(d1,"%") if d0="" then '1バイト目か? if d2(0)="" then 'エンコード文字だったら d3=clng("&H" & d2(1)) if (d3>=&H81 and d3<=&H9f) or (d3>=&He0 and d3<=&Hef) then '2バイト文字の1バイト目なら d0=d2(1) d="" else d0="" d=chr("&H" & d2(1)) End if Else d0="" d=d2(0) End if 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch