On 13 February 2013 11:27, Per Tunedal <per.tune...@operamail.com> wrote:
> Hi,
> I'm experimenting with the script on the page
> http://wiki.apertium.org/wiki/Building_dictionaries .
>
> I'm repeatedly getting an error message:
>
> 'import sitecustomize' failed; use -v for traceback
>
> All the same, I get results:
>
> <e><p><l>plånbok<s n="n"/></l><r>Portemonnæ<s n="n"/></r></p></e>
> <e><p><l>programkod<s n="n"/></l><r>Kildekode<s n="n"/></r></p></e>
> <e><p><l>register<s n="n"/></l><r>Register<s n="n"/></r></p></e>
> <e><p><l>replik<s n="n"/></l><r>Replik<s n="n"/></r></p></e>
> <e><p><l>scanner<s n="n"/></l><r>Skanner<s n="n"/></r></p></e>
>
> The Danish national characters are distorted, though.
>
> Any suggestions?
>

cat [your file]|perl -MEncode -ane 'chomp;if(m!(<e><p><l>)([^<]*)(<s
n="n"/></l><r>)([^<]*)(<s n="n"/></r></p></e>)!){print
"$1$2$3".encode("iso-8859-1",decode("utf-8", $4))."$5\n";}'


-- 
<Sefam> Are any of the mentors around?
<jimregan> yes, they're the ones trolling you

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to