Re: handling of different encodings

Derek Robert Price <[email protected]> Fri, 06 Feb 2004 13:20:23 -0500
Newsgroups gmane.comp.tex.texi2html.devel
Organization Ximbiot <http://ximbiot.com>
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dumas Patrice wrote:

>Hi,
>
>Currently texi2html handle rightly only the documents
>encoded in the current locale. Instead the
>@documentencoding value should be used. I read the
>perl documentation, and I think this could be rather
>easy to achieve. However it requires a perl version
>above 5.8 (with the Encode module).
>
>I think that abandonating compatibility with older
>perl isn't right. However I don't know how to have a
>code conditionnal on the perl version (in C I would
>have used #ifdef or #if). The possibility I see would
>be to require a file at execution time if the perl
>version is high enough. In this file Encode would be
>used. And the functions in that file would be used if
>the perl version is high enough.


This was what my first suggestion was going to be.

>I would really prefer something happening at compile
>time, and no new file to require.
>
>Any thoughts ?


Why not have configure detect the perl version and decide to include the
Encode module when the version is high enough?  That should be fairly
straight-forward.  If the perl version isn't high enough, it would
include the non-encode module.

There is one good reason to have the code detect at run time though - we
would no longer be able to distribute an architecture independant
version of the script.  It would have to be built on each platform or at
least we would have to distribute two versions, but as things stand we
almost have to do that anyhow.

Derek

- --
                *8^)

Email: [email protected]

Get CVS support at <http://ximbiot.com>!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org

iD8DBQFAI9rmLD1OTBfyMaQRAgOyAJ4swyHhqlCI4sHPCe9ghcyTal1YfQCg9fkQ
8FDh5VSM0SlvQT6Lp81ptdM=
=+f7t
-----END PGP SIGNATURE-----