Re: Utf8 encoding

[email protected] (Juerd Waalboer) Fri, 26 Oct 2007 12:21:27 +0200
Newsgroups perl.unicode
Message-ID <[email protected]>
Vajramatti Shashidhar (DS/EES1) skribis 2007-10-26 12:02 (+0200):
> 	my $parser = "";
> 	my $doc = "";
> 	$parser = XML::LibXML->new();#	
> 	$doc = $parser->parse_file( $x_file );

You should combine these for nicer code:

    my $parser = XML::LibXML->new();
    my $doc = $parser->parse_file( $x_file );

What are the contents of the file? (What is its encoding?)

The first line should contain the encoding:

    <?xml version="1.0" encoding="iso-8859-1"?>
-- 
Met vriendelijke groet,  Kind regards,  Korajn salutojn,

  Juerd Waalboer:  Perl hacker  <#####@juerd.nl>  <http://juerd.nl/sig>
  Convolution:     ICT solutions and consultancy <[email protected]>