diff conv.pl @ 181:47dac58691ee

New templating system, small fixes
author sourcer
date Thu, 26 Jan 2012 01:15:57 +0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/conv.pl	Thu Jan 26 01:15:57 2012 +0400
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+use strict;
+use File::Find;
+
+find(sub {
+    open my $hfile, "<:encoding(cp1251)", $_  or warn "failed: $!" and return;
+    
+    my @data = <$hfile>;
+    
+    close $hfile;
+    undef($hfile);
+    
+    chomp foreach @data;
+    
+    open $hfile, ">:encoding(utf8)", $_ or warn "failed: $!" and return;
+    
+    print $hfile "$_\n" foreach @data;
+    
+}, qw(Lib _test _doc));
\ No newline at end of file