Changeset 1868

Show
Ignore:
Timestamp:
07/01/06 12:31:07
Author:
miyagawa
Message:

fix charset regexp and test

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Geo-Coder-Google/trunk/Changes

    r1843 r1868  
    11Revision history for Perl extension Geo::Coder::Google 
     2 
     30.02  Sat Jul  1 12:27:38 JST 2006 
     4        - Fix charset= regexp to match with utf-8 
    25 
    360.01  Tue Jun 13 19:54:08 2006 
  • Geo-Coder-Google/trunk/lib/Geo/Coder/Google.pm

    r1843 r1868  
    22 
    33use strict; 
    4 our $VERSION = '0.01'; 
     4our $VERSION = '0.02'; 
    55 
    66use Carp; 
     
    5252    # Content-Type: text/javascript; charset=UTF-8; charset=Shift_JIS 
    5353    my @ctype = $res->content_type; 
    54     my $charset = ($ctype[1] =~ /charset=(\w+)$/)[0] || "utf-8"; 
     54    my $charset = ($ctype[1] =~ /charset=([\w\-]+)$/)[0] || "utf-8"; 
    5555 
    5656    my $content = Encode::decode($charset, $res->content); 
  • Geo-Coder-Google/trunk/t/01_live.t

    r1843 r1868  
    1717} 
    1818 
    19 
     19SKIP: { 
     20    skip "google.co.jp suspended geocoding JP characters", 1; 
    2021    my $geocoder = Geo::Coder::Google->new(apikey => $ENV{GOOGLE_MAPS_APIKEY}, host => 'maps.google.co.jp'); 
    2122    my $location = $geocoder->geocode("東京都港区赤坂2-14-5");