[MKDoc-commit] [Petal] Fix to allow decode_charset to be other than utf-8 (William

bruno at mkdoc.demon.co.uk bruno at mkdoc.demon.co.uk
Wed Mar 16 13:23:56 GMT 2005


Log Message:
-----------
[Petal] Fix to allow decode_charset to be other than utf-8 (William McKee)

Modified Files:
--------------
    Petal:
        Changes
    Petal/lib:
        Petal.pm
    Petal/t:
        088_latin1.t

-------------- next part --------------
Index: Changes
===================================================================
RCS file: /var/spool/cvs/Petal/Changes,v
retrieving revision 1.131
retrieving revision 1.132
diff -LChanges -LChanges -u -r1.131 -r1.132
--- Changes
+++ Changes
@@ -8,6 +8,7 @@
     - $Petal::Hash::String::VARIABLE_RE_BRACKETS no longer treats ${1} as a variable
     - Fix that adds language to the mix when generating cache keys
     - tests 088 & 089 check for correct decode_charset behaviour
+    - Fix to allow decode_charset to be other than utf-8 (William McKee)
 
 2.15 Wed Jan  5 15:31:00 2005
     - Fixed some 'used of uninitialized values' warnings
Index: Petal.pm
===================================================================
RCS file: /var/spool/cvs/Petal/lib/Petal.pm,v
retrieving revision 1.127
retrieving revision 1.128
diff -Llib/Petal.pm -Llib/Petal.pm -u -r1.127 -r1.128
--- lib/Petal.pm
+++ lib/Petal.pm
@@ -578,7 +578,7 @@
     if ($] > 5.007)
     {
 	my $encoding = Encode::resolve_alias ($DECODE_CHARSET) || 'utf8';
-	open FP, "<:$encoding", "$file_path" || die 'Cannot read-open $file_path';
+	open FP, "<:encoding($encoding)", "$file_path" or die "Cannot read-open $file_path";
     }
     else
     {
Index: 088_latin1.t
===================================================================
RCS file: /var/spool/cvs/Petal/t/088_latin1.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lt/088_latin1.t -Lt/088_latin1.t -u -r1.1 -r1.2
--- t/088_latin1.t
+++ t/088_latin1.t
@@ -15,9 +15,6 @@
 my $copy     = chr (169);
 my $acirc    = chr (194);
 
-TODO: {
-    local $TODO = 'decode_charset only works when we are using utf-8';
 
 like   ($string, qr/$copy/);
-};
 unlike ($string, qr/$acirc/);


More information about the MKDoc-commit mailing list