texi2html-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texi2html-bug] Problems with texi2html and Japanese navigation bars


From: Reinhold Kainhofer
Subject: Re: [Texi2html-bug] Problems with texi2html and Japanese navigation bars
Date: Tue, 3 Feb 2009 02:32:55 +0100
User-agent: KMail/1.11.0 (Linux/2.6.27-11-generic; KDE/4.2.0; i686; ; )

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Dienstag, 3. Februar 2009 01:57:54 Patrice Dumas wrote:
> On Tue, Feb 03, 2009 at 12:26:39AM +0100, Reinhold Kainhofer wrote:
> > Yes, "use utf8;" doesn't help. However, "use encoding 'utf8';" does solve
> > the issue.
>
> Where did you put it? I tried in the ja file, but it didn't changed
> anything.

I put it at the top of texi2html.pl

> > The thing is that the translations are inserted as utf-8 into the program
> > code, so perl needs to interpret the whole script as utf8 (the console is
> > set to utf8 by default, so when it gets the two-byte sequence, it
> > automatically displays it correctly as utf8, even though the string is
> > not utf; the file writer on the other hand seems to try to do some more
> > magic and messes things up). I'm still wondering why "use utf8;" doesn't
> > work, though, while "use encoding 'utf8';"does..
>
> The strange thing is that it works for regular text. In that case, the
> following are called on the out filehandle:
>
> binmode(FILE, ':utf8');
> binmode(FILE,':encoding(utf-8-strict)');
>
> Also the fact that it works when outputting in the console is strange
> since it makes it look like that the character were rightly ingested
> by perl and decoded to the internal perl encoding.

The problem is that the japanese characters are stored as wide characters in 
the translations file, and the file writer appears to split them up (unless 
they are read as utf8 from the perl source code, so perl knows they are utf8), 
while the console understands them as wide characters.

Cheers,
Reinhold


- -- 
- ------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJh57ITqjEwhXvPN0RAshZAJ4pOA73hvlPrwG+XZRdykqs+EquDgCgp4Bd
p7POwB+/oh9a+YoWmiVmw/o=
=OxMK
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]