/[webpac]/trunk/test_charset.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/test_charset.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 36 by dpavlin, Sat Mar 15 19:16:31 2003 UTC revision 40 by dpavlin, Sat Mar 15 21:33:36 2003 UTC
# Line 3  Line 3 
3  use strict;  use strict;
4  use OpenIsis;  use OpenIsis;
5  use Text::Iconv;  use Text::Iconv;
6    use XML::Simple;
7    use Data::Dumper;
8    
9  Text::Iconv->raise_error(1);     # Conversion errors raise exceptions  Text::Iconv->raise_error(1);     # Conversion errors raise exceptions
10    
# Line 20  my $row = OpenIsis::read( $db, $row_id ) Line 22  my $row = OpenIsis::read( $db, $row_id )
22    
23  use isis_sf;  use isis_sf;
24    
25  print $isis_codepage->convert(isis_sf($row,'200')),"\n";  print isis_sf($row,'200'),"\n";
26    
27    my $xml = '<?xml version="1.0" encoding="ISO-8859-2"?><xml>truŠ</xml>';
28    #my $xml_codepage = Text::Iconv->new('ISO-8859-2','UTF-8');
29    #$xml = XMLin($xml_codepage->convert($xml));
30    
31    $xml = XMLin($xml);
32    
33    #undef $xml_codepage;
34    my $xml_codepage = Text::Iconv->new('UTF-8','iso-8859-2');
35    $xml = $xml_codepage->convert($xml),"\n";
36    
37    print Dumper($xml),"$xml\n";
38    

Legend:
Removed from v.36  
changed lines
  Added in v.40

  ViewVC Help
Powered by ViewVC 1.1.26