projects
/
webpac
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
355410c
)
small program to test codepage which OpenIsis returns
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 15 Mar 2003 19:16:31 +0000
(19:16 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 15 Mar 2003 19:16:31 +0000
(19:16 +0000)
git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@36
13eb9ef6
-21d5-0310-b721-
a9d68796d827
test_charset.pl
[new file with mode: 0755]
patch
|
blob
diff --git a/test_charset.pl
b/test_charset.pl
new file mode 100755
(executable)
index 0000000..
99fef6d
--- /dev/null
+++ b/
test_charset.pl
@@ -0,0
+1,24
@@
+#!/usr/bin/perl -w
+
+use strict;
+use OpenIsis;
+use Text::Iconv;
+
+Text::Iconv->raise_error(1); # Conversion errors raise exceptions
+
+#my $to = "UTF-8";
+my $to = "ISO-8859-2";
+
+my $isis_codepage = Text::Iconv->new('852',$to);
+
+my $isis_db="/data/isis_data/small/ps/PERI/PERI";
+my $row_id = 11;
+
+my $db = OpenIsis::open( $isis_db );
+
+my $row = OpenIsis::read( $db, $row_id );
+
+use isis_sf;
+
+print $isis_codepage->convert(isis_sf($row,'200')),"\n";
+