Changeset 1942

Show
Ignore:
Timestamp:
09/13/06 18:33:20
Author:
miyagawa
Message:

add Term::Encoding

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • misc/todo.pl

    r1941 r1942  
    3131sub main { 
    3232    setup_config(); 
     33    setup_term_encoding(); 
    3334 
    3435    GetOptions(\%args, "tags=s", "tag=s@", "group=s") or pod2usage(2); 
     
    119120} 
    120121 
     122sub setup_term_encoding { 
     123    my $encoding; 
     124    eval { 
     125        require Term::Encoding; 
     126        $encoding = Term::Encoding::get_encoding(); 
     127    }; 
     128    $encoding ||= "utf-8"; 
     129    binmode STDOUT, ":encoding($encoding)"; 
     130} 
     131 
    121132=head1 TASKS 
    122133