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
>From 272951e21383bfaccc46dadf99733849d7702333 Mon Sep 17 00:00:00 2001
From: Petr Vorel <petr.vo...@gmail.com>
Date: Fri, 24 Feb 2012 17:11:40 +0100
Subject: [PATCH] Explicitly set PERL_UNICODE environment variable
This prevents fail building when PERL_UNICODE contain "i" or "D"
---
dictionaries/prj/tests.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dictionaries/prj/tests.mk b/dictionaries/prj/tests.mk
index 0eb6008..7048dd6 100644
--- a/dictionaries/prj/tests.mk
+++ b/dictionaries/prj/tests.mk
@@ -25,4 +25,4 @@
ALLTAR : test1
test1 .PHONY :
@echo Validating thesaurus file
- $(COMMAND_ECHO) ..$/util$/th_check.pl *.dat
+ $(COMMAND_ECHO) PERL_UNICODE=0 ..$/util$/th_check.pl *.dat
--
1.7.9.1
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice