Re: handling of different encodings

Derek Robert Price <[email protected]> Fri, 06 Feb 2004 14:51:04 -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:

>>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.
>
>
>I did exactly that. Look in configure.in, I verify that
>use Encode;
>works.
>
>>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.
>
>
>The check is done at run time if texi2html is called with texi2html.pl


I've only glanced at your T2h_*unicode files, but it looks like they are
mosly the same code.  Would the following construct I just stumbled
across in the validate script help you combine the two files into a
single file?

# If File::Spec::Functions isn't available, let's fall back quietly
# to a replacement function.
eval {
    require File::Spec::Functions;
    File::Spec::Functions->import('catfile');
};
*catfile = sub { join('/', @_) } if $@;
                                                                           
 
 

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

iD8DBQFAI/AoLD1OTBfyMaQRAoRrAJ94cfBY3nVnJmFOf7O5qf/Ns+OvuwCgrpPE
Lr8XpZhe3mCZheAS9NLZpMA=
=I/Ew
-----END PGP SIGNATURE-----