EUC テキストを SJISで読む
Linux で書き出したEUCコードのテキストファイルをSJISでASPで読み込む。
・basp21 必要
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=x-sjis">
</head>>
<body>
<%
set fs = Server.CreateObject( "Scripting.FileSystemObject" )
filespec = server.mappath("./search.txt")
filespec2 = server.mappath("./search2.txt")
Set bobj = Server.CreateObject("basp21")
rc=bobj.KconvFile(filespec,filespec2,1,2)
kkk=0
set f = fs.openTextFile(filespec2)
do until f.AtEndOfStream
content = f.readline
' ここで適当な処理
Loop
set f = nothing
set bobj =nothing
set fs = nothing
%>
</body>
</html>
php でログの解析を行って、
urldecode($val) でテキストファイルに書き出し。
そのテキストファイルを ASPで読み込んでAccessに入れた。
・basp21 必要
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=x-sjis">
</head>>
<body>
<%
set fs = Server.CreateObject( "Scripting.FileSystemObject" )
filespec = server.mappath("./search.txt")
filespec2 = server.mappath("./search2.txt")
Set bobj = Server.CreateObject("basp21")
rc=bobj.KconvFile(filespec,filespec2,1,2)
kkk=0
set f = fs.openTextFile(filespec2)
do until f.AtEndOfStream
content = f.readline
' ここで適当な処理
Loop
set f = nothing
set bobj =nothing
set fs = nothing
%>
</body>
</html>
php でログの解析を行って、
urldecode($val) でテキストファイルに書き出し。
そのテキストファイルを ASPで読み込んでAccessに入れた。
[2007-11-10]page top