Add a <meta> tag into %html-header-tags% to explicitly declare

the charset of HTML files generated from an DocBook/SGML file.

Note to translators:

  While some of the translations already use this tweak
  in their localized freebsd.dsl, it is no longer needed so
  removed and the necessary changes have been added instead.
  After this commit, please make sure to define
  &doc.html.charset; in <langcode>/share/sgml/l10n.ent.
  If not defined, iso-8859-1 is used by default and it can
  break the translation.

Discussed on:	-doc
This commit is contained in:
Hiroki Sato 2004-11-07 16:26:09 +00:00
parent ade2f328b2
commit c24e829215
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=22836
17 changed files with 37 additions and 25 deletions
el_GR.ISO8859-7/share/sgml
ja_JP.eucJP/share/sgml
pl_PL.ISO8859-2/share/sgml
ru_RU.KOI8-R/share/sgml
share/sgml
sr_YU.ISO8859-2/share/sgml
zh_CN.GB2312/share/sgml

View file

@ -18,3 +18,6 @@ PUBLIC "-//FreeBSD//ENTITIES DocBook Team Entities//EL"
PUBLIC "-//FreeBSD//ENTITIES DocBook Trademark Entities//EL"
"trademarks.ent"
PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
"l10n.ent"

View file

@ -11,20 +11,10 @@
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
<![ %lang.el.dsssl; [
(define %gentext-language% "el")
]]>
<!-- HTML only .................................................... -->
<![ %output.html; [
<!-- Add a header with the correct character-set/encoding -->
(define %html-header-tags%
'(("META" ("HTTP-EQUIV" "Content-Type")
("CONTENT" "text/html; charset=ISO-8859-7"))))
<!-- Generate links to HTML man pages -->
(define %refentry-xref-link% #t)

View file

@ -0,0 +1,4 @@
<!-- $FreeBSD$ -->
<!-- charset for HTML output -->
<!ENTITY doc.html.charset "iso-8859-7">

View file

@ -1,18 +1,13 @@
<!-- $FreeBSD: doc/ja_JP.eucJP/share/sgml/freebsd.dsl,v 1.2 2000/03/27 04:38:47 kuriyama Exp $ -->
<!-- $FreeBSD$ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY freebsd.dsl PUBLIC "-//FreeBSD//DOCUMENT DocBook Language Neutral Stylesheet//EN" CDATA DSSSL>
<!ENTITY % lang.ja.dsssl "IGNORE">
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
<![ %lang.ja.dsssl; [
(define %gentext-language% "ja")
]]>
(define %html-header-tags% '(("META" ("HTTP-EQUIV" "Content-Type") ("CONTENT" "text/html; charset=EUC-JP"))))
</style-specification-body>
</style-specification>

View file

@ -10,3 +10,6 @@
<!ENTITY doc.langcode.ja "ja_JP.eucJP">
<!ENTITY doc.langcode "&doc.langcode.ja;">
<!-- charset for HTML output -->
<!ENTITY doc.html.charset "euc-jp">

View file

@ -9,3 +9,6 @@ PUBLIC "-//FreeBSD//DOCUMENT DocBook Stylesheet//EN"
PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//PL"
"mailing-lists.ent"
PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
"l10n.ent"

View file

@ -244,9 +244,6 @@
(list (normalize "sect4") " ")
(list (normalize "sect5") " ")
))
(define %html-header-tags% '(("META" ("HTTP-EQUIV" "Content-Type") ("CONTENT" "text/html; charset=iso-8859-2"))))
</style-specification-body>
</style-specification>

View file

@ -0,0 +1,4 @@
<!-- $FreeBSD$ -->
<!-- charset for HTML output -->
<!ENTITY doc.html.charset "iso-8859-2">

View file

@ -30,8 +30,6 @@
(define %gentext-language% "ru")
]]>
(define %html-header-tags% '(("META" ("HTTP-EQUIV" "Content-Type") ("CONTENT" "text/html; charset=koi8-r"))))
<!-- Generate links to HTML man pages -->
(define %refentry-xref-link% #t)

View file

@ -17,3 +17,6 @@
<!ENTITY doc.langcode.ru "ru_RU.KOI8-R">
<!ENTITY doc.langcode "&doc.langcode.ru;">
<!-- charset for HTML output -->
<!ENTITY doc.html.charset "koi8-r">

View file

@ -37,6 +37,9 @@
(define %hyphenation% #f) <!-- Silence a warning -->
(define %html-header-tags% '(("META" ("HTTP-EQUIV" "Content-Type")
("CONTENT" "text/html; charset=\"&doc.html.charset;\""))))
(define %gentext-nav-use-tables%
;; Use tables to build the navigation headers and footers?
#t)

View file

@ -13,3 +13,6 @@
<!-- docformat navi -->
<!ENTITY docnavi.single-html "Single HTML">
<!ENTITY docnavi.split-html "Split HTML">
<!-- charset for HTML output -->
<!ENTITY doc.html.charset "iso-8859-1">

View file

@ -1,9 +1,11 @@
-- ...................................................................... --
-- FreeBSD SGML Public Identifiers ...................................... --
-- $FreeBSD: doc/sr_YU.ISO_8859-2/share/sgml/catalog,v 1.1 2000/09/28 23:29:45 nbm Exp $
-- $FreeBSD$
--
PUBLIC "-//FreeBSD//DOCUMENT DocBook Stylesheet//EN"
"freebsd.dsl"
PUBLIC "-//FreeBSD//ENTITIES DocBook Language Specific Entities//EN"
"l10n.ent"

View file

@ -45,8 +45,6 @@
(literal "doc@FreeBSD.org"))
(literal ">.")))))
]]>
(define %html-header-tags% '(("META" ("HTTP-EQUIV" "Content-Type") ("CONTENT" "text/html; charset=iso-8859-2"))))
</style-specification-body>
</style-specification>

View file

@ -0,0 +1,4 @@
<!-- $FreeBSD$ -->
<!-- charset for HTML output -->
<!ENTITY doc.html.charset "iso-8859-2">

View file

@ -18,7 +18,6 @@
(literal "“")
(process-children)
(literal "”")))
(define %html-header-tags% '(("META" ("HTTP-EQUIV" "Content-Type") ("CONTENT" "text/html; charset=GB2312"))))
</style-specification-body>
</style-specification>

View file

@ -7,3 +7,6 @@
<!-- docformat navi -->
<!ENTITY docnavi.single-html "完整文件">
<!ENTITY docnavi.split-html "章节模式">
<!-- charset for HTML output -->
<!ENTITY doc.html.charset "gb2312">