[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1120] trunk/LedgerSMB/Form.pm



Revision: 1120
          http://svn.sourceforge.net/ledger-smb/?rev=1120&view=rev
Author:   tetragon
Date:     2007-04-28 19:13:15 -0700 (Sat, 28 Apr 2007)

Log Message:
-----------
Fix encode/decode call syntax

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2007-04-28 21:01:17 UTC (rev 1119)
+++ trunk/LedgerSMB/Form.pm	2007-04-29 02:13:15 UTC (rev 1120)
@@ -141,7 +141,7 @@
         $str = $self->escape( $str, 1 ) if $1 == 0 && $2 < 44;
     }
 
-    $str = utf8::encode('utf8', $str);
+    utf8::encode($str);
     $str =~ s/([^a-zA-Z0-9_.-])/sprintf("%%%02x", ord($1))/ge;
     $str;
 
@@ -153,8 +153,9 @@
     $str =~ tr/+/ /;
     $str =~ s/\\$//;
 
+    utf8::encode($str) if utf8::is_utf8($str);
     $str =~ s/%([0-9a-fA-Z]{2})/pack("c",hex($1))/eg;
-    $str = utf8::decode('utf8', $str) unless utf8::is_utf8($str);
+    utf8::decode($str);
     $str =~ s/\r?\n/\n/g;
 
     $str;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.