/[pub]/suikawiki/wikidata/migration/test2.pl
Suika

Contents of /suikawiki/wikidata/migration/test2.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue May 4 00:56:31 2010 UTC (14 years, 6 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
added to the repository

1 use strict;
2 require Encode::EUCJP1997OPENNEC;
3
4 while (<>) {
5 my $file_name = $_;
6 $file_name =~ tr/\x0d\x0a//d;
7 warn $file_name . "...\n";
8 open my $file, '<', $file_name;
9 local $/ = undef;
10 my $c = <$file>;
11
12 $c =~ s/[\x00-\x7f][\xa0-\xff][\x00-\x7f]//g;
13
14 eval {
15 Encode::decode ('euc-jp-1997-open-nec', $c, 1);
16 1;
17
18 } or warn $@ and print "ERR: $file_name\n";
19
20 }

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24