[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using Perl's cc
From: |
Eli Zaretskii |
Subject: |
Re: Using Perl's cc |
Date: |
Sun, 05 Jul 2015 18:15:01 +0300 |
> Date: Sun, 5 Jul 2015 15:50:01 +0100
> From: Gavin Smith <address@hidden>
> Cc: address@hidden
>
> It would be nice to be able to fall back to using alternative
> functions on other platforms as well, so I'd suggest not making it
> Windows-specific.
Windows provides an API for converting from UTF-8 to UTF-16, and I
intended to use it. Also, the functions that accept a wchar_t
argument need to be different depending on whether wchar_t is UCS-4 or
UTF-16. I think this makes the code sufficiently different to warrant
separate implementations.
> If the code isn't very long, it would probably be better to put it
> in xspara.c; if it's a lot of code, it would be better in a
> different file. Use your best judgement.
OK.
> Do you think the choice of which functions should be used can be made
> at run-time, possibly in addition to a choice at build-time? For
> example, if switching to a UTF-8 locale fails?
Yes, I think so: which locales are installed on any particular system
is not known in advance. Granted, less and less Posix systems don't
have a UTF-8 locale available, but I'm not sure this can be relied
upon.
Btw, the code currently asks for en_US.UTF-8, but what we actually
need is for the codeset to be UTF-8, regardless of the locale, no? So
perhaps it's better not to ask for en_US, since it could be that
locale is not available, but en_GB.UTF-8 (say) is. Is it possible to
call 'setlocale' to only switch the codeset?
> There's two big hurdles to running the extension module: one is
> building it, which it looks like you will manage to do; but the other
> is loading it from a running Perl instance, and I still don't know if
> that will succeed. I did eventually get both to work on the OpenCSW
> test machines for Solaris 10
> (https://buildfarm.opencsw.org/buildbot/waterfall?category=texinfo),
> so it is promising that it worked on a system other than my own, but I
> would have to see it work on many more systems before I was confident
> it was reliable, especially on a system like Windows.
What are the hurdles? I'd expect Perl to be able to load a .dll file
on Windows exactly like it loads a .so file on Unix. The only issue
might be telling Perl to look in the directory where Texinfo's "make
install" puts them, but I expect texi2any to take care of that
already, no?
- Re: Using Perl's cc, (continued)
- Re: Using Perl's cc, Eli Zaretskii, 2015/07/04
- Re: Using Perl's cc, Gavin Smith, 2015/07/04
- Re: Using Perl's cc, Eli Zaretskii, 2015/07/04
- Message not available
- Message not available
- Re: Using Perl's cc, Gavin Smith, 2015/07/04
- Re: Using Perl's cc, Eli Zaretskii, 2015/07/04
- Re: Using Perl's cc, Eli Zaretskii, 2015/07/04
- Re: Using Perl's cc, Gavin Smith, 2015/07/25
- Re: Using Perl's cc, Eli Zaretskii, 2015/07/26
- Re: Using Perl's cc, Eli Zaretskii, 2015/07/05
- Re: Using Perl's cc, Gavin Smith, 2015/07/05
- Re: Using Perl's cc,
Eli Zaretskii <=
- Re: Using Perl's cc, Gavin Smith, 2015/07/05
- Re: Using Perl's cc, Eli Zaretskii, 2015/07/05
- Re: Using Perl's cc, Eli Zaretskii, 2015/07/11
- Re: Using Perl's cc, Gavin Smith, 2015/07/11
- Re: Using Perl's cc, Eli Zaretskii, 2015/07/11
- Re: Using Perl's cc, Gavin Smith, 2015/07/11
- Re: Using Perl's cc, Eli Zaretskii, 2015/07/11
- Re: Using Perl's cc, Gavin Smith, 2015/07/11
- Re: Using Perl's cc, Eli Zaretskii, 2015/07/11
- Re: Using Perl's cc, Eli Zaretskii, 2015/07/11