[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Texi2html-cvs] texi2html texi2html.pl
From: |
Patrice Dumas |
Subject: |
[Texi2html-cvs] texi2html texi2html.pl |
Date: |
Thu, 02 Apr 2009 13:42:26 +0000 |
CVSROOT: /cvsroot/texi2html
Module name: texi2html
Changes by: Patrice Dumas <pertusus> 09/04/02 13:42:26
Modified files:
. : texi2html.pl
Log message:
Attempt to work around issues appearing with use encoding 'utf8'.
use encoding 'utf8' fixes japanese.texi ouotput but breaks many other
test cases.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texi2html/texi2html.pl?cvsroot=texi2html&r1=1.266&r2=1.267
Patches:
Index: texi2html.pl
===================================================================
RCS file: /cvsroot/texi2html/texi2html/texi2html.pl,v
retrieving revision 1.266
retrieving revision 1.267
diff -u -b -r1.266 -r1.267
--- texi2html.pl 2 Apr 2009 09:13:47 -0000 1.266
+++ texi2html.pl 2 Apr 2009 13:42:26 -0000 1.267
@@ -43,6 +43,11 @@
# used to find a relative path back to the current working directory
use File::Spec;
+#use encoding::warnings;
+#Â for translations
+#use encoding 'utf8';
+#use utf8;
+
#
# According to
# address@hidden (Larry Jones)
@@ -74,7 +79,7 @@
}
# CVS version:
-# $Id: texi2html.pl,v 1.266 2009/04/02 09:13:47 pertusus Exp $
+# $Id: texi2html.pl,v 1.267 2009/04/02 13:42:26 pertusus Exp $
# Homepage:
my $T2H_HOMEPAGE = "http://www.nongnu.org/texi2html/";
@@ -3230,8 +3235,18 @@
{
if ($Texi2HTML::Config::USE_UNICODE)
{
- $cross_ref_texi_map{$key} =
chr(hex($Texi2HTML::Config::unicode_map{$key}));
- # cross_transliterate_texi_map is only used if USE_UNICODE or
+ my $char_nr = hex($Texi2HTML::Config::unicode_map{$key});
+ #$cross_ref_texi_map{$key} =
chr(hex($Texi2HTML::Config::unicode_map{$key}));
+ #$cross_ref_texi_map{$key} =
pack("U0U*",hex($Texi2HTML::Config::unicode_map{$key}));
+ if ($char_nr > 126 and $char_nr < 255)
+ {
+ $cross_ref_texi_map{$key} = Encode::decode("iso-8859-1",
chr($char_nr));
+ }
+ else
+ {
+ $cross_ref_texi_map{$key} = chr($char_nr);
+ }
+ # cross_transliterate_texi_map is only used if
#Â USE_UNIDECODE is unset and TRANSLITERATE_NODE is set
if (exists
($Texi2HTML::Config::transliterate_map{$Texi2HTML::Config::unicode_map{$key}}))
{
@@ -3239,14 +3254,13 @@
}
else
{
- $cross_transliterate_texi_map{$key} =
chr(hex($Texi2HTML::Config::unicode_map{$key}));
+ $cross_transliterate_texi_map{$key} =
$cross_ref_texi_map{$key};
}
}
else
{
$cross_ref_texi_map{$key} = '_' .
lc($Texi2HTML::Config::unicode_map{$key});
- # cross_transliterate_texi_map is only used if USE_UNICODE or
- #Â USE_UNIDECODE is unset and TRANSLITERATE_NODE is set
+ # cross_transliterate_texi_map is used if TRANSLITERATE_NODE is
set
if (exists
($Texi2HTML::Config::transliterate_map{$Texi2HTML::Config::unicode_map{$key}}))
{
$cross_transliterate_texi_map{$key} =
$Texi2HTML::Config::transliterate_map{$Texi2HTML::Config::unicode_map{$key}};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Texi2html-cvs] texi2html texi2html.pl,
Patrice Dumas <=