[XeTeX] newbie umlaut problems

Benct Philip Jonsson bpj at melroch.se
Thu Nov 19 21:43:36 CET 2009


On 2009-11-19 Michael wrote:
> No, you're right, vim does default to utf-8 on my system. The
> problem was that my XeTex source file was created by a Perl
> script I wrote, which gets its input from a MySQL DB.  My Perl
> script hadn't been handling the encoding/decoding correctly,
> and was writing latin1 output.  And then I just continued to
> edit this file, which had been created by Perl, as I was
> tinkering with XeTex.
> 

That you still have to tell perl to use utf8 is indeed a pain.
In Perl 5.10 there is a rather easy way to tell perl to treat
STDIN and STDOUT as utf8, which I have in my Perl template file:

use open ':utf8';
use open ':std';

With data received from DBs and the like you still need
to use Encode and decode('utf8', $data), however.

Kind of OT, I know, but what do you expect of a certified
PerlTeX nut?  Sometimes I actually think the two are one... ;)

/BP


More information about the XeTeX mailing list