From: Bruno Haible Date: Fri, 26 Oct 2001 09:32:14 +0000 (+0000) Subject: Add support for ISO-8859-1 characters like @,{c} X-Git-Tag: v0.11~395 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc61459c4058eb2e84b1c934b56c30c92e956826;p=thirdparty%2Fgettext.git Add support for ISO-8859-1 characters like @,{c} --- diff --git a/doc/texi2html b/doc/texi2html index 4beec01b3..e5e3d165e 100755 --- a/doc/texi2html +++ b/doc/texi2html @@ -9,7 +9,9 @@ # # #-############################################################################## -# @(#)texi2html 1.52 01/05/98 Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch +# @(#)texi2html 1.52a 01/05/98 Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch +# 1.52a: Use acute accent instead of apostrophe. Add support for ISO-8859-1 +# characters with cedilla, circumflex etc. # The man page for this program is included at the end of this file and can be # viewed using the command 'nroff -man texi2html'. @@ -37,7 +39,7 @@ $NODESRE = '[^@{}:\'`"]+'; # RE for a list of node names $XREFRE = '[^@{}]+'; # RE for a xref (should use NODERE) $ERROR = "***"; # prefix for errors and warnings -$THISPROG = "texi2html 1.52"; # program name and version +$THISPROG = "texi2html 1.52a"; # program name and version $HOMEPAGE = "http://wwwinfo.cern.ch/dis/texi2html/"; # program home page $TODAY = &pretty_date; # like "20 September 1993" $SPLITTAG = "\n"; # tag to know where to split @@ -149,6 +151,16 @@ $html2_doctype = '', 'today', $TODAY, + 'aa', 'å', + 'AA', 'Å', + 'ae', 'æ', + 'AE', 'Æ', + 'o', 'ø', + 'O', 'Ø', + 'ss', 'ß', + 'exclamdown', '¡', + 'questiondown', '¿', + 'pounds', '£' ); # @@ -179,6 +191,12 @@ $html2_doctype = '\`(.*)\'<\/\1>/$2/; # remove HTML tags with quotes + 1 while s/<(\w+)>\`(.*)\´<\/\1>/$2/; # remove HTML tags with quotes 1 while s/<(\w+)>(.*)<\/\1>/$2/; # remove HTML tags $_ = &unprotect_html($_); &unprotect_texi; @@ -1277,7 +1295,7 @@ while (@lines2) { $old = ''; while ($old ne $_) { $old = $_; - if (/\@(\w+)\{/) { + if (/\@(\w+|"|\~|,|\^)\{/) { ($before, $style, $after) = ($`, $1, $'); if (defined($style_map{$style})) { $_ = $after; @@ -1718,6 +1736,13 @@ sub do_uref { sub do_url { &anchor('', $_[0], $_[0]) } +sub do_diaeresis { return "&$_[0]uml;"; } +sub do_acuteaccent { return "&$_[0]acute;"; } +sub do_graveaccent { return "&$_[0]grave;"; } +sub do_tildeaccent { return "&$_[0]tilde;"; } +sub do_cedilla { return "&$_[0]cedil;"; } +sub do_circumflex { return "&$_[0]circ;"; } + sub apply_style { local($texi_style, $text) = @_; local($style); @@ -1726,7 +1751,7 @@ sub apply_style { if (defined($style)) { # known style if ($style =~ /^\"/) { # add quotes $style = $'; - $text = "\`$text\'"; + $text = "\`$text\´"; } if ($style =~ /^\&/) { # custom $style = $'; @@ -1756,7 +1781,7 @@ sub substitute_style { while ($changed) { $changed = 0; $done = ''; - while (/\@(\w+){([^\{\}]+)}/) { + while (/\@(\w+|"|\~|,|\^){([^\{\}]+)}/) { $text = &apply_style($1, $2); if ($text) { $_ = "$`$text$'"; @@ -1881,7 +1906,7 @@ sub print_toplevel_footer { print FILE <texi2html -translator version 1.52.

+translator version 1.52a.

EOT &print_footer; } @@ -2054,7 +2079,7 @@ without any modification. .B @end ifhtml This indicates the end of an HTML section. .SH VERSION -This is \fItexi2html\fP version 1.52, 01/05/98. +This is \fItexi2html\fP version 1.52a, 01/05/98. .PP The latest version of \fItexi2html\fP can be found in WWW, cf. URL http://wwwinfo.cern.ch/dis/texi2html/