Changeset 328
- Timestamp:
- 07/27/06 13:40:30 (2 years ago)
- Location:
- cybozu2ical/trunk
- Files:
-
- 2 modified
-
config.yaml.sample (modified) (1 diff)
-
cybozu2ical (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cybozu2ical/trunk/config.yaml.sample
r314 r328 5 5 time_zone: Asia/Tokyo 6 6 tzname: JST 7 input_encoding: shiftjis 8 output_encoding: utf8 -
cybozu2ical/trunk/cybozu2ical
r321 r328 7 7 use YAML; 8 8 use LWP::UserAgent; 9 use Encode qw/from_to decode_utf8 encode _utf8/;9 use Encode qw/from_to decode_utf8 encode/; 10 10 use Text::CSV_XS; 11 11 use Data::ICal; … … 18 18 use Getopt::Long; 19 19 20 our $VERSION = '0.0 4';20 our $VERSION = '0.05'; 21 21 our $ENCODE_NCR = 0; 22 22 … … 43 43 44 44 my $content = $res->content; 45 from_to($content, 'shiftjis', 'utf8');45 from_to($content, $cfg->{input_encoding} || 'shiftjis', 'utf8'); 46 46 my @lines = grep /^\d+,ts\.\d+,/, split(/\r?\n/, $content); 47 47 … … 117 117 $vcalendar->add_entry($vtimezone); 118 118 119 print $ENCODE_NCR ? 119 my $enc = $cfg->{output_encoding} || 'utf8'; 120 print ($enc eq 'ncr') ? 120 121 encode_ncr($vcalendar->as_string) : 121 encode _utf8($vcalendar->as_string);122 encode($enc, $vcalendar->as_string); 122 123 123 124 sub encode_ncr {
![(please configure the [header_logo] section in trac.ini)](/public/chrome/common/trac_banner.png)