簡體   English   中英

html沒有在firefox中正確顯示內容

[英]html not showing content properly in firefox

我有一個HTML文件。 當我在文本編輯器中打開時,它顯示如下。

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

      <head>
          <title>Srimad Bhagavatam Canto 4 Chapter 9 Verse 5</title>
          <link rel="STYLESHEET" href="../../../om.css" type="text/css" title="om tat sat">
          <meta http-equiv="Content-Type" content="text/html; Charset=ISO-8859-1">
          <meta name="KEYWORDS" content="Srimad Bhagavatam">
          <meta name="DESCRIPTION" content="Srimad Bhagavatam Canto 4 Chapter 9 Verse 5">
      </head>

      <body>
          <p class="h">4.9.5</p>
          <p class="c">sa vai tadaiva pratipāditāḿ giraḿ</p>
          <p class="c">daivīḿ parijñāta-parātma-nirṇayaḥ</p>
          <p class="c">taḿ bhakti-bhāvo 'bhyagṛṇād asatvaraḿ</p>
          <p class="c">pariśrutoru-śravasaḿ dhruva-kṣitiḥ</p>
          <p class="t">TRANSLATION</p>
          <p>At that time Dhruva Mahārāja became perfectly aware of the Vedic conclusion and understood the Absolute Truth and His relationship with all living entities. In accordance with the line of devotional service to the Supreme Lord, whose fame is widespread,
              Dhruva, who in the future would receive a planet which would never be annihilated, even during the time of dissolution, offered his deliberate and conclusive prayers.</p>
      </body>

      </html>

當我在Firefox中打開這個html文件。 輸出是

    4.9.5

    sa vai tadaiva pratipÄditÄmÌ giramÌ

    daivÄ«mÌ parijñÄta-parÄtma-nirnÌ£ayahÌ£

    tamÌ bhakti-bhÄvo 'bhyagrÌ£nÌ£Äd asatvaramÌ

    pariÅ›rutoru-Å›ravasamÌ dhruva-ksÌ£itihÌ£

    TRANSLATION

    At that time Dhruva MahÄrÄja became perfectly aware of the Vedic conclusion and understood the Absolute Truth and His relationship with all living entities. In accordance with the line of devotional service to the Supreme Lord, whose fame is widespread, Dhruva, who in the future would receive a planet which would never be annihilated, even during the time of dissolution, offered his deliberate and conclusive prayers.

我無法理解這個問題,為什么它會改變diacratics並顯示一些錯誤的字母?

請嘗試更改

<meta http-equiv="Content-Type" content="text/html; Charset=ISO-8859-1">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

ISO 8859-1是單字節編碼,僅包含前256個unicode字符。

@geedubb打敗了我,這就是解決方案。 為了擴展, UTF-8可以代表每個unicode字符,而@geedbubb指出ISO 8859-1是有限的。

最簡單的解決方法是在文本編輯器中以BOM的 UTF-8編碼保存文件。 任何合理的文本編輯器都有一個命令。

這將覆蓋文檔本身甚至HTTP頭中的任何字符集聲明。

然后,您可以刪除標簽<meta http-equiv="Content-Type" content="text/html; Charset=ISO-8859-1">無用。 如果您希望保留它以用於文檔目的,您當然需要將ISO-8859-1更改為UTF-8

ISO-8859-1僅適用於西歐和北歐語言(甚至不適用於它們)。 對於頁面中的文本(科學/學術音譯中的梵文文本),UTF-8是唯一在網頁上有意義的字符編碼。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM