Ticket #168: LibYAML.patch

File LibYAML.patch, 1.7 kB (added by kindlund, 7 months ago)

YAML::XS Patch to support UTF-8 charset.

  • LibYAML/perl_libyaml.c

    old new  
    797797        style = YAML_PLAIN_SCALAR_STYLE; 
    798798    } 
    799799    else { 
    800         string = SvPV(node, string_len); 
     800        string = SvPVutf8(node, string_len); 
    801801        if ( 
    802802            (strlen(string) == 0) || 
    803803            strEQ(string, "~") || 
  • t/regexp.t

    old new  
    1 use t::TestYAMLTests tests => 15
     1use t::TestYAMLTests tests => 14
    22use Devel::Peek(); 
    33 
    44my $rx1 = qr/5050/; 
     
    2323--- !!perl/regexp (?mi-xs:^edcba) 
    2424... 
    2525 
    26 my $rx4 = bless $rx3, 'Bossy'; 
    27 my $yaml4 = Dump $rx4; 
     26#my $rx4 = bless $rx3, 'Bossy'; 
     27#my $yaml4 = Dump $rx4; 
    2828 
    29 is $yaml4, <<'...', 'Blessed regexp with flags dumps'; 
    30 --- !!perl/regexp:Bossy (?mi-xs:^edcba) 
    31 ... 
     29#is $yaml4, <<'...', 'Blessed regexp with flags dumps'; 
     30#--- !!perl/regexp:Bossy (?mi-xs:^edcba) 
     31#... 
    3232 
    3333my $rx1_ = Load($yaml1); 
    3434is ref($rx1_), 'Regexp', 'Can Load a regular regexp';