Discussion:
[libdvdcss-devel] [PATCH] Document generation fixes (retry)
Ian Abbott
2007-07-24 14:52:22 UTC
Permalink
[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 ***@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">
Diego Biurrun
2007-07-27 09:13:23 UTC
Permalink
Post by Ian Abbott
[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
To fix it, the character encoding of the input files needs to be
INPUT_ENCODING = ISO-8859-1
Why not do the sensible thing and convert the documentation to UTF-8?

Diego

Loading...