[libdvdcss-devel] [PATCH] Document generation fixes (retry)

Ian Abbott ian at abbott.org
Tue Jul 24 16:52:22 CEST 2007


[Previous version of this email never went through - perhaps because of
the attachment?  I'm resending with the patch included in the main body.]

Using Doxygen 1.5.2, I get LaTeX errors generating the libdvdcss
documentation.  Doxygen assumes the input files are utf-8 encoded unless
told otherwise, but the C sources are iso-8859-1 encoded.  This causes
LaTeX to throw a wobbly and go into interactive error correction mode:


LaTeX Warning: Reference `dvdcss_8h' on page 3 undefined on input line 3.

) [3] [4]
Chapter 3.
(./dvdcss_8h.tex [5]

! Package inputenc Error: Unicode char \u8:�ph not set up for use with
LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.53 \item[Author:]St�ph
                        ane Borel $<${\tt stef at via.ecp.fr}$>$
?


To fix it, the character encoding of the input files needs to be
declared in doxygen.cfg:

INPUT_ENCODING = ISO-8859-1

This causes the html output to be incorrect.  Because Doxygen now knows
the input is ISO-8859-1, it converts it to utf-8, rather than blindly
copying the unconverted text to the html output.  In order to display
the html output properly, it now needs to be declared as charset=utf-8
instead of charset=iso-8859-1 in the header.html file.

The attached patch against the svn trunk fixes both of these problems.

Regards,
Ian Abbott.

Index: doc/doxygen.cfg.in
===================================================================
--- doc/doxygen.cfg.in	(revision 203)
+++ doc/doxygen.cfg.in	(working copy)
@@ -364,6 +364,10 @@
 INPUT                  = @TOP_SRCDIR@/src/dvdcss/dvdcss.h \
                          @TOP_SRCDIR@/src/libdvdcss.c
 
+# The INPUT_ENCODING tag sets the character encoding of the input files.
+
+INPUT_ENCODING         = ISO-8859-1
+
 # If the value of the INPUT tag contains directories, you can use the 
 # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
 # and *.h) to filter out the source-files in the directories. If left 
Index: doc/header.html
===================================================================
--- doc/header.html	(revision 203)
+++ doc/header.html	(working copy)
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html>
   <head>
-    <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
     <title>libdvdcss documentation</title>
     <link href="/main.css" rel="stylesheet" type="text/css">
     <link href="/doxygen.css" rel="stylesheet" type="text/css">


_______________________________________________
libdvdcss-devel mailing list
libdvdcss-devel at videolan.org
http://mailman.videolan.org/listinfo/libdvdcss-devel


More information about the libdvdcss-devel mailing list