Changeset 256

Show
Ignore:
Timestamp:
08/09/2006 08:28:59 PM
Author:
shiva
Message:

Declare UTF-8 encoding around sqlite2 DBI calls to prevent double-encoding.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Ken/Unicode/Vss2Svn/DataCache.pm

    r250 r256  
    4545        return undef; 
    4646    } 
     47 
     48    # we'll be sending UTF-8 to this handle 
     49    binmode $self->{fh}, ":utf8"; 
    4750 
    4851    return $self; 
  • branches/Ken/Unicode/Vss2Svn/Dumpfile.pm

    r248 r256  
    33use Vss2Svn::Dumpfile::Node; 
    44use Vss2Svn::Dumpfile::SanityChecker; 
    5 use Encode qw(from_to)
     5require Encode
    66 
    77use warnings; 
     
    8787    $author = '' if !defined($author); 
    8888 
    89     # convert to utf8 
    90     from_to ($comment, "windows-1252", "utf8"); 
    91     from_to ($author, "windows-1252", "utf8"); 
     89    $comment = Encode::decode_utf8( $comment ); 
     90    $author = Encode::decode_utf8( $author ); 
    9291 
    9392    if ($revision > 0) { 
     
    704703 
    705704    my $string = $node->get_headers(); 
    706     from_to ($string, "windows-1252", "utf8"); 
    707705    print $fh $string; 
    708706    $self->output_content($node->{hideprops}? undef : $node->{props}, 
  • branches/Ken/Unicode/vss2svn.pl

    r255 r256  
    1919use Vss2Svn::SvnRevHandler; 
    2020use Vss2Svn::Dumpfile; 
     21 
     22require Encode; 
    2123 
    2224our(%gCfg, %gSth, %gErr, %gFh, $gSysOut, %gActionType, %gNameLookup, %gId); 
     
    471473 
    472474    while(defined($row = $sth->fetchrow_hashref() )) { 
    473         $gNameLookup{ $row->{offset} } = $row->{name}
     475        $gNameLookup{ $row->{offset} } = Encode::decode_utf8( $row->{name} )
    474476    } 
    475477}  #  End LoadNameLookup 
     
    695697                        . "'$row->{itemtype}' unexpected"); 
    696698        } 
     699 
     700        $row->{itemname} = Encode::decode_utf8( $row->{itemname} ); 
    697701 
    698702        # The handler's job is to keep track of physical-to-real name mappings 

These ads are automatically generated by Google based on the content of this page. Revenue from these ads helps to pay for hosting fees of this site; however, these ads do not constitute an endorsement by PumaCode.org.