in reply to One bird, two Unicode names

Unicode::String is obsolete and deprecated, it was used in perl 5.6.0 when perl had weak internal unicode support.

Use Encode, also it is more convenient because it comes with perl

Replies are listed 'Best First'.
Re^2: One bird, two Unicode names
by RCH (Sexton) on Mar 11, 2011 at 08:26 UTC
    Could you explain how to apply <Use Encode> in my particular case? The relevant bit of program is like this
    my $zip = Archive::Zip->new( $infile ); my $content = $zip->contents('content.xml'); my $workbook_ref = read_xml_string($content); foreach my $sheet ( sort keys %$workbook_ref ) { foreach my $row( @{$$workbook_ref{$sheet}} ) { foreach my $cell_contents (@{$row}){ next unless defined( $cell_contents ); DECODE $cell_contents SOMEHOW
    Thanks in advance
    RichardH

    P.S. For
    DECODE $cell_contents SOMEHOW
    I tried this
    use Encode; my $octets = encode("iso-8859-1", $string); return( $octets );

    Result of the above
    Güldenstädt’s Redstart => Güldenstädt?s Redstart
    i.e. "ü" for "ü" (good)
    and "ä" for "ä" (good)
    but "?" for "’" (Bad)
    "’" is RIGHT SINGLE QUOTATION MARK, says charinfo(8217 )