On Mon, 2004-11-15 at 14:41 +0100, Christian Vandendorpe wrote:
> I'm trying to read an xmltv file that is in utf-8 mode from a perl
> script however I'm having some weird problems.
>
Well, UTF-8 and perl is still weird to me as well, despite having used
it a number of times and really trying to understand it. You are
supposed to be able to read and write in any encoding using the
techniques shown in perldoc perluniintro. I have never gotten this to
work consistently, and especially not together with XML::LibXML which I
use a lot.
What I have done in the past is to use Text::Iconv to convert between
different encodings and it works after a bit of fiddling.
Having said that, I notice that you are giving Swedish TV-listings as
sample data. tv_grab_se_swedb outputs data in iso-8859-1 (I do all the
necessary conversions in the backend and tv_grab_se_swedb only prints
strings without processing them). That data might be easier for you to
work with.
/Mattias
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
|