素人がアップする、など、どうしてもファイルの中身がshift-jisである場合、 AJAXのgetで、ファイルを要求、それをUTF-8に変換してブラウザで表示する、などという場合、ブラウザがIE以外であればoverrideMimeTypeを使えば良いが、IEの場合、responseBodyをADOを通して変換、などとややこしい。そんなんだったら、サーバ側でcgiで変換して送り返してやれ、という場合のcgi。 perlでやった方が良いのかもしれないけど。 #!/bin/bash #getSJISfile.cgi echo -e "Content-type: text/plain;charset=UTF-8\n\n" #encodeURIされて送られてきたURLをdecodeする param=$(echo ${QUERY_STRING} | tr % = | nkf -WwmQ ) #&以降を