[PATCH] fix building dictionaries when PERL_UNICODE environment

Petr Vorel petr.vorel at gmail.com
Fri Feb 24 08:28:35 PST 2012


>> I run into troubles while building dictionaries, because I have on my system
>> set PERL_UNICODE=SDL (perl script
>> clone/dictionaries/dictionaries/util/th_check.pl dies as it's forced to use
>> UTF-8, but not all dictionaries are in this encoding).
> Interesting, I'd never seen this environment variable before. :)
Diacritics made me to learn .
>
> First, setting this to "SDL" emulates the behaviour of Perl 5.8.0 -
> this was deliberately fixed in 5.8.1 (see the perlrun and perl581delta
> docs), so I would be careful about putting it in your environment.
> It's likely to break more than just LibreOffice.
Thank you for pointing L background. Well, I don't consider L as 
harmful, but I don't
really need it. But it's broken even with PERL_UNICODE=SD. "i" implied 
by D is the source
of troubles. So we need to remove "i" and "D" from env or set the env 
explicitly. "0" or
"S" are working settings.
>
> I am tempted to push your patch as a temporary fix, but there must be
> a better way to handle this long-term... I'll check that I can
> reproduce the problem, first.
Have you been successful?
>
> As an idea, would it be possible to identify and re-encode the
> dictionaries themselves as UTF-8?  After which we could set the
> encoding of the filehandles explicitly in th_check.pl.
First I thought it would be better to recode all of them to utf8. But 
these files are
taken from ispell, aren't they? Do we want to increase diversity from 
upstream?  So I
thing it's better to set explicitly the env. But prj/tests.mk in 
dictionaries is IMHO
better place than Makefile in core repo. See the patch.

Petr


More information about the LibreOffice mailing list