Oracle에서 자료를 Perl로자져왔는데 한글이 깨지는군요.
글쓴이: stypr / 작성시간: 토, 2005/08/27 - 5:07오후
Oracle에서 등록 인명을 가져왔는데.한글을 가져오면 모두 ??????????로 가져옵니다.
뭔가 가져오는 방법이 있는지 모르겠군요.
한글이 정확하게 나오게말입니다.
아래는 가져오는 소스입니다.
어떻게하면 한글이 잘 ~~~ 보일까요?
$dbh = DBI->connect('DBI:Oracle:database_name',
'id',
'pw'
) || die "Database connection not made: $DBI::errstr";
my $sql = qq{ SELECT a, b, c FROM table_name
};
my $sth = $dbh->prepare($sql);
$sth->execute();
my($a, $b, $c);
$sth->bind_columns(undef, \$a, \$b, \$c);
open(F, "> ./outbut.sql");
while( $sth->fetch() ) {
print F "$a, $b, $c\n";
}
close(F);
$sth->finish();
$dbh->disconnect;
Forums:
댓글 달기