Re: [exim-dev] Doc building issue

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Todd Lyons
Fecha:  
A: exim-dev
Asunto: Re: [exim-dev] Doc building issue
On Mon, Jan 13, 2014 at 1:57 PM, Phil Pennock <pdp@???> wrote:
> On 2014-01-13 at 09:04 -0800, Todd Lyons wrote:
>> non-ASCII characters (boxes/borders) and it's piped to the ./Tidytxt
>> perl script which converts those characters to plain ASCII. The
>> problem is that if the PERL_UNICODE environment variable is set, in
>> any way, shape, or form (even empty!) the data coming in on STDIN is
>> not treated byte-by-byte, but as unicode chars. The s/// command then
>> doesn't match per ascii character, but per unicode character.
>
>> The fix above was to add to the beginning of the Tidytxt script:
>
>> +binmode(STDIN, ":encoding(iso-8859-1)");


Found another way:

if (defined $ENV{'PERL_UNICODE'})
{
delete $ENV{'PERL_UNICODE'};
exec ($0, @ARGV);
}

> I think that forcing the use of what is, at this point, a legacy
> encoding is somewhat prone to breakage with other issues, such as our
> use of UTF-8 for personal names.


I didn't feel it was quite the same since this is in the doc
generation and not in the exim binary or exim binary interaction, but
my line is also quite arbitrary.

> I suspect that a better approach would be to unset the environment
> variable before it makes it through to make(1).


I'm testing a change to the main shell script in the build farm. If
the operator is not using the script, then it's up to them to detect
and remove it.
...and...
It worked, pushing it out to the clients.

> What's the invocation mechanism for building the doc suite on the
> build-farm right now? Any reason to not add a .build_farm.sh file to
> doc/doc-docbook/ which can have the build steps needed, which might be
> as simple as manipulating the environment before invoking make?


Overkill IMHO. The make-docs phase is a simple shell invocation from
a perl script, so if it really came down to it, I could delete the env
var at that point as well (for example, if someone isn't using my
run_cron.sh master script).

...Todd
--
The total budget at all receivers for solving senders' problems is $0.
If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine