HTML中日语文本的编码问题

时间:2018-07-31 04:43:39

标签: html encoding utf-8 cjk shift-jis

我正在使用旧的日语网站项目。我从服务器下载了旧文件,并且在脱机模式下使用浏览器可以正常工作。

但是当我用编辑器打开它时,文本已损坏。然后,我尝试通过更改大多数编码来解决此问题。像下面

  • utf-8
  • 带有bom的utf-8
  • Shift JIS

然后,我尝试使用多个现代编辑器并通过更改元字符集来进行尝试。我也尝试在Google上找到解决方案,但没有得到任何积极的结果。

仅HTML示例

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
  <meta name="keywords" content="�ソスp�ソス�ソス,�ソスe�ソス[�ソスv�ソスN�ソス�ソス�ソス�ソス,�ソス�ソス�ソス�ソス\,�ソスp�ソス�ソスe�ソス[�ソスv�ソスN�ソス�ソス�ソス�ソス,,�ソスp�ソス鼬暦ソスフ外�ソス�ソス�ソスl�ソスl�ソズ派�ソス�ソス">
  <meta name="description" content="�ソスp�ソス�ソスフ翻�ソス�ソスE�ソスハ厄ソスヘビ�ソス[�ソスR�ソスX�ソスI�ソスp�ソス�ソスl�ソスC�ソスe�ソスB�ソスu�ソスノゑソス�ソスm�ソス�ソス�ソスネテ�ソス[�ソスv�ソスN�ソス�ソス�ソス�ソス�ソスB�ソスr�ソスW�ソスl�ソスX�ソスA�ソス�ソス�ソスI�ソスE�ソスZ�ソスp�ソスI�ソスネ難ソスe�ソスフテ�ソス[�ソスv�ソスN�ソス�ソス�ソス�ソス�ソスワで包ソス�ソスL�ソス�ソス�ソス�ソス�ソス�ソスナのテ�ソス[�ソスv�ソスN�ソス�ソス�ソス�ソス�ソス�ソスs�ソス�ソス�ソストゑソス�ソス�ソスワゑソス�ソスB">
  <meta name="robots" content="index,follow">
  <title>�ソスp�ソス�ソス �ソスe�ソス[�ソスv�ソスN�ソス�ソス�ソス�ソス �ソス�ソス�ソス�ソス\</title>
  <script language="JavaScript" type="text/JavaScript">
    function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
    for(i=0; i
    <a.length; i++) if (a[i].indexOf( "#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_swapImgRestore() {
    //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n,
      d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf( "?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n];
      for (i=0;!x&&i
      <d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
        if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments;
        document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
        x.oSrc=x.src; x.src=a[i+2];} } function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+ ".location='"+selObj.options[selObj.selectedIndex].value+
        "'"); if (restore) selObj.selectedIndex=0; } </script>
        <link href="../../../styleseet.css" rel="stylesheet" type="text/css">
</head>

<body class="bodycss" id="02">
  <table class="top" cellpadding="0" cellspacing="0">
    <tr>
      <td align="center">
        <table class="top_text" cellpadding="0" cellspacing="0">
          <tr>
            <td>
              �ソス@�ソスp�ソス�ソス|�ソス�ソス �ソスp�ソス�ソスハ厄ソス �ソスp�ソス�ソスフネ�ソスC�ソスe�ソスB�ソスu�ソスX�ソス^�ソスb�ソスt�ソス|�ソス�ソスメにゑソス�ソスT�ソス|�ソス[�ソスg
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <table width="790" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td bgcolor="#FFFFFF">
        <table class="sub_bg" cellpadding="0" cellspacing="0">
          <tr>
            <td rowspan="2">
              <a href="/">
                <img src="../../img/spacer.gif" width="197" height="47" alt="�ソスr�ソス[�ソスR�ソスX" border="0">
              </a>
            </td>
            <td class="top_Navi">
              <ul>
                <li class="gnv01">
                  <a href="/">�ソス�ソス�ソス{�ソス�ソス</a>
                </li>
                <li class="gnv02">
                  <a href="/english/">english</a>
                </li>
                <li class="gnv03">
                  <a href="/chinese/">�ソス�ソス�ソス�ソス�ソス�ソス</a>
                </li>
                <li class="gnv04">
                  <a href="/korean/">�ソスリ搾ソス�ソス�ソス</a>
                </li>
              </ul>
            </td>
          </tr>
          <tr>
            <td height="35" align="right">
              <table class="ken" cellspacing="0" cellpadding="0">
                <tr>
                  <td class="ken_bg">�ソスT�ソスC�ソスg�ソス�ソス�ソス�ソス</td>
                  <td>
                    <input type=text name=q maxlength=255 class="ken_input">
                  </td>
                  <td width="50">
                    <input type=submit name=btnG value="�ソス�ソス�ソス�ソス" class="ken_btn">
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
        <table class="sub_bg02" cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td class="sub_tdregi">
              <table class="sub_regi" cellspacing="0" cellpadding="0">
                <tr>
                  <td class="title">�ソスo�ソス^�ソス�ソス�ソス�ソス</td>
                  <td class="con">
                    <script type="text/javascript" src="../../js/country.js"></script>
                    �ソス�ソス�ソス�ソス</td>
                </tr>
                <tr>
                  <td class="title">�ソスo�ソス^�ソスl�ソス�ソス</td>
                  <td class="con">
                    <script type="text/javascript" src="../../js/people.js"></script>
                    �ソスl</td>
                </tr>
                <tr>
                  <td class="title">�ソスo�ソス^�ソス�ソス�ソス齔�</td>
                  <td class="con">
                    <script type="text/javascript" src="../../js/language.js"></script>
                    �ソス�ソス�ソス�ソス</td>
                </tr>
              </table>
            </td>
            <td class="text999">�ソスr�ソス[�ソスR�ソスX�ソスナは外�ソス�ソス�ソスl�ソスl�ソスb�ソスg�ソス�ソス�ソス[�ソスN�ソス�ソス�ソス�ソス�ソス�ソスA�ソス�ソス�ソスネゑソス�ソスニ撰ソス�ソスE�ソス�ソスツなゑソス�ソスワゑソス�ソスB</td>
          </tr>
        </table>
        <div class="down_Navi">
          <ul>
            <li class="gn01">
              <a href="/">�ソスz�ソス[�ソス�ソス</a>
            </li>
            <li class="gn02">
              <a href="../../01language/">�ソス�ソス闊オ�ソス�ソス�ソス�ソス�ソス�ソス</a>
            </li>
            <li class="gn03">
              <a href="../../02foreigner/">�ソスO�ソス�ソス�ソスl�ソスh�ソス�ソス�ソスT�ソス[�ソスr�ソスX</a>
            </li>
            <li class="gn04">
              <a href="../../03business/">�ソスC�ソスO�ソスr�ソスW�ソスl�ソスX�ソスT�ソス|�ソス[�ソスg</a>
            </li>
            <li class="gn05">
              <a href="../../04international/">�ソス�ソス�ソスロ交流奇ソス�ソス</a>
            </li>
            <li class="gn06">
              <a href="../../05staff/">�ソスX�ソス^�ソスb�ソスt�ソスo�ソス^</a>
            </li>
            <li class="gn07">
              <a href="../../06price/">�ソス�ソス�ソス�ソス齬暦ソス\</a>
            </li>
            <li class="gn08">
              <a href="../../07estimate/">�ソス�ソス�ソスマゑソスヒ暦ソス</a>
            </li>
          </ul>
        </div>

        <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:1px #000 solid;">
          <tr>
            <td width="140" valign="top" bgcolor="#42418c">
              <!--#include Virtual="../left-->
            </td>
            <td width="641" valign="top">
              <br>
              <table width="630" border="0" cellpadding="0" cellspacing="0" class="f12">
                <tr>
                  <td>
                    <a href="/">TOP</a>�ソス�ソス
                    <a href="../../">�ソス�ソス闊オ�ソス�ソス�ソス�ソス�ソス�ソス</a>�ソス�ソス
                    <a href="../">�ソスp�ソス�ソス</a>�ソス�ソス
                    <a href="../../14tape/">�ソスp�ソス�ソスe�ソス[�ソスv�ソスN�ソス�ソス�ソス�ソス</a>�ソス�ソス�ソス�ソス�ソス�ソス\
                  </td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr align="center ">
                  <td>
                    <br>
                    <a href="/ ">�ソスp�ソス�ソスe�ソス[�ソスv�ソスN�ソス�ソス�ソス�ソス�ソスs�ソスn�ソスo</a> |
                    <a href="#garuntee ">�ソスi�ソス�ソス�ソスロ擾ソス</a>
                    |
                    <a href="price>�ソス�ソス�ソス�ソス\</a> |
                    <a href=" estimation>�ソス�ソス�ソスマゑソス</a>
                    |
                    <a href=" ../ ">�ソスp�ソス�ソスT�ソス[�ソスr�ソスX�ソス齬�</a>
                  </td>
                </tr>
                <tr>
                  <td align="center ">
                    <br>
                    <br>
                    <font color="#000000 " size="3 ">�ソス�ソス�ソスp�ソス�ソスe�ソス[�ソスv�ソスN�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス\
                      <br>
                    </font>
                  </td>
                </tr>
                <tr>
                  <td align="center ">
                    <table width="95% " border="0 " cellspacing="5 " cellpadding="0 " bgcolor="#CCCCCC
                      " height="200 ">
                      <tr>
                        <td bgcolor="#FFFFFF " valign="top ">
                          <div align="left ">
                            <table border="0 " width="100% " cellspacing="3 ">
                              <tr>
                                <td width="49% ">
                                  <div align="center ">
                                    <center>
                                      <table border="1 " width="300 " cellspacing="0 " bordercolor="#000080
                      " bordercolordark="#000080 " bordercolorlight="#000080 ">
                                        <tr>
                                          <td width="293 " align="center ">
                                            <p align="center ">�ソスp�ソス�ソスe�ソス[�ソスv�ソスN�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス\</p>
                                          </td>
                                        </tr>
                                        <tr>
                                          <td align="center ">�ソス�ソス600/1�ソス�ソス</td>
                                        </tr>
                                      </table>
                                    </center>
                                  </div>
                                </td>
                              </tr>
                              <tr>
                                <td>&nbsp;</td>
                              </tr>
                              <tr>
                                <td>
                                  <table width="300 " border="1 " align="center " cellspacing="0 " bordercolor="#000080
                      " bordercolorlight="#000080 " bordercolordark="#000080 ">
                                    <tr>
                                      <td width="294 " align="center ">
                                        <p align="center ">�ソスp�ソス�ソスe�ソス[�ソスv�ソスN�ソス�ソス�ソス�ソス+�ソス�ソス�ソス{�ソス�ソスソ具ソス\</p>
                                      </td>
                                    </tr>
                                    <tr>
                                      <td align="center ">�ソス�ソス2,500/1�ソス�ソス</td>
                                    </tr>
                                  </table>
                                </td>
                              </tr>
                              <tr>
                                <td>
                                  <br> �ソス�ソス�ソスl�ソスF
                                  <br> �ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソスヤゑソスm�ソスF�ソス�ソスフ鯉ソス�ソスマゑソス�ソスニなゑソスワゑソス�ソスB&nbsp;
                                  <br> �ソス�ソス�ソス[�ソス�ソス�ソスヘ通擾ソスA�ソスc�ソスニ難ソス3�ソス�ソス�ソスネ擾ソスニなゑソスワゑソス�ソスB
                                  <br> �ソス�ソス�ソスX�ソス�ソス�ソスノゑソス�ソスe�ソス[�ソスv�ソスフ受け渡�ソス�ソス�ソスフ場合�ソスヘ郵�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス[�ソス�ソス�ソスノ会ソス�ソスZ�ソス�ソス�ソス�ソスワゑソス�ソスB
                                  <br> �ソス�ソス�ソス[�ソスi�ソスヘ��ソス�ソス[�ソスh�ソスf�ソス[�ソス^�ソス[�ソスi�ソスニなゑソスワゑソス�ソスB
                                  <br> �ソス�ソス�ソスナ低注�ソス�ソス�ソス�ソス�ソスi3,000�ソス~�ソス�ソス�ソス�ソスニなゑソスワゑソス�ソスB
                                  <br> �ソス�ソス�ソス�ソス�ソスヒ暦ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソスe�ソスノ関ゑソス�ソストキ�ソス�ソス�ソス�ソス�ソスZ�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス鼾��ソスヘ、�ソスL�ソス�ソス�ソス�ソス�ソスZ�ソス�ソス�ソス�ソス�ソスクゑソス�ソスワゑソス�ソスB
                                  <br> �ソス�ソス�ソス�ソス�ソス�ソスナは別途�ソス�ソス�ソス�ソス�ソスニなゑソスワゑソス�ソスB&nbsp;
                                  <br> �ソス�ソス�ソス�ソス�ソス�ソスネ擾ソスヤなゑソスフに関ゑソス�ソストは以会ソス�ソスフ表�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソスB&nbsp;
                                  <tr>
                                    <TD>
                                      <TABLE width="100% " border=1 cellspacing="0 " bordercolor="#000080 " cellpadding="2
                      " bordercolorlight="#000080 " bordercolordark="#000080 ">
                                        <TBODY>
                                          <TR>
                                            <TD width="164 ">
                                              <DIV align="center">�ソス�ソス�ソス�ソス</DIV> </TD>
                                            <TD width="221 ">
                                              <DIV align="center">�ソス�ソスe</DIV>
                                            </TD>
                                            <TD width="165 ">
                                              <DIV align="center">�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス</DIV>
                                            </TD>
                                          </TR>
                                          <TR>
                                            <TD width="164 ">�ソス�ソス蜷ォ�ソスフ搾ソス�ソス�ソス�ソス�ソス�ソス</TD>
                                            <TD width="221 ">�ソス�ソステ関連�ソスネど撰ソス蜷ォ�ソスフ搾ソス�ソス�ソス�ソス�ソス�ソス </TD>
                                            <TD width="165 ">25�ソス�ソス�ソス`50�ソス�ソス�ソス�ソス�ソス�ソス </TD>
                                          </TR>
                                          <TR>
                                            <TD width="164 ">�ソスフ趣ソス�ソスA�ソスj�ソス�ソス�ソス[�ソスX�ソスネゑソス</TD>
                                            <TD width="221 ">�ソスフの歌趣ソス�ソスA�ソス�ソスb�ソス�ソス�ソスx�ソス�ソス�ソス�ソス�ソス�ソス�ソスフゑソスネゑソス </TD>
                                            <TD width="165 ">100�ソス�ソス�ソス�ソス�ソス�ソス </TD>
                                          </TR>
                                          <TR>
                                            <TD width="164 ">�ソス�ソス�ソス}</TD>
                                            <TD width="221 ">�ソスS�ソス`�ソスT�ソスc�ソスニ難ソス�ソスネ難ソス </TD>
                                            <TD width="165 ">50�ソス�ソス�ソス�ソス�ソス�ソス </TD>
                                          </TR>
                                          <TR>
                                            <TD width="164 ">�ソス�ソス�ソス�ソス�ソス}</TD>
                                            <TD width="221 ">�ソスP�ソス`�ソスR�ソスc�ソスニ難ソス�ソスネ難ソス </TD>
                                            <TD width="165 ">100�ソス�ソス�ソス�ソス�ソス�ソス </TD>
                                          </TR>
                                          <TR>
                                            <TD width="164 ">�ソス^�ソス�ソス�ソス�ソスヤゑソス�ソスヌゑソス�ソスネゑソス�ソス�ソスフ(�ソス�ソス�ソスj</TD>
                                            <TD width="221 ">�ソス�ソス�ソス�ソス�ソス�ソス�ソスノゑソス�ソス�ソス�ソス�ソス�ソス </TD>
                                            <TD width="165 ">25�ソス�ソス�ソス`50�ソス�ソス�ソス�ソス�ソス�ソス </TD>
                                          </TR>
                                        </TBODY>
                                      </TABLE>
                                    </TD>
                                    <tr>
                                      <TD> �ソスi�ソス�ソス�ソスj�ソスヌゑソス�ソス�ソス�ソストゑソス�ソス�ソス�ソス�ソス�ソスネゑソス�ソスモ擾ソス�ソスノ関ゑソス�ソストは×�ソス~�ソス~�ソスニ表�ソスL�ソス�ソス�ソス�ソス鼾��ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソスワゑソス�ソスB
                                        <br>
                                        <br> �ソス�ソス�ソスマゑソスノ関ゑソス�ソス�ソス
                                        <br> �ソス�ソス�ソス�ソス�ソスマ対会ソス�ソスi1�ソス�ソス�ソスヤ以難ソスj�ソスA�ソス�ソス�ソスマ厄ソス�ソス�ソス
                                        <br> �ソス�ソス�ソス{�ソス�ソス�ソス�ソス�ソス[�ソス�ソス�ソスf�ソスB�ソスX�ソスJ�ソスE�ソス�ソス�ソスg�ソスノ関ゑソス�ソストはゑソス�ソス竝��ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソス�ソスB
                                        </TD>
                                    </TR>
                            </table>
                          </div>
                          </td>
                          </tr>
                    </table>
                    </td>
                    </tr>
              </table>
              <br>
              <table width="600 " border="0 " align="center " cellspacing="0 ">
                <tr>
                  <td height="20 "></td>
                </tr>
                <tr>
                  <td align="center ">
                    <!--#include Virtual="../foot_price-->
                  </td>
                </tr>
              </table>
              <br>
              </td>
              </tr>
              <tr>
                <td colspan="5">
                  <table width="100%" class="footer" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <th width="397" height="50" class="text_no">�ソス�ソス�ソス�ソス�ソスマゑソスE�ソス�ソス�ソス竄「�ソス�ソス�ソス墲ケ�ソスヘ気�ソスy�ソスノどゑソス�ソス�ソス</th>
                      <td width="395">
                        <a href="/01language/estimateall><img src=" ../../img/spacer.gif " width="131 " height="68 " alt="�ソス�ソス�ソス�ソス�ソスマゑソス "></a> 
                <a href="/02foreigner/inquiry-for-dispatch>
                          <img src="../../img/spacer.gif" width="125" height="68" alt="�ソス�ソス�ソス竝��ソス�ソス">
                        </a>
                        <a href="/06price/">
                          <img src="../../img/spacer.gif" width="121" height="68" alt="�ソス�ソス�ソス�ソス\">
                        </a>
                      </td>
                    </tr>
                    <tr>
                      <td height="50" colspan="2" class="footer_text">�ソス�ソス�ソス�ソス�ソス �ソスミ �ソス�ソス105-0013�ソス�ソス�ソス�ソス�ソスs�ソス`�ソス�ソスl�ソス�ソス�ソス�ソス2-1-3 �ソス�ソス�ソスX�ソスr�ソス�ソス4F
                        Tel�ソスF03-5733-4264 Fax�ソスF03-3433-3320
                        <br /> Copyright &copy; by b-cause,Inc. 2003-2016 </td>
                    </tr>
                  </table>
                </td>
              </tr>
        </table>
        </td>
        </tr>
  </table>
</body>

</html>

Editor Screenshot with encoding problem

1 个答案:

答案 0 :(得分:0)

HTML中的所有日语内容似乎都已损坏。

我尝试用ひたすらデコード来解码各种编码的(乱码)字符串,但是所有结果似乎都不是有意义的字符串。

使用编辑器打开文件时,HTML文件可能被错误地转换和保存。恢复内容的可靠方法是再次从服务器下载HTML文件,然后使用另一个可以处理日语编码(例如Notepad++)的编辑器打开该文件。