DBD::ODBC does not support Unicode (and thus arabic characters) at all. You may want to try my patch for DBD::ODBC: README file at http://www.alexander-foken.de/README.unicode-patch.html , gzip compressed patch at http://www.alexander-foken.de/unicode-patch.txt.gz .

If you use Oracle or PostgreSQL, don't take the detour via ODBC, use a native driver like DBD::Oracle (supports Unicode with Oracle 9 and newer on both client and server) or DBD::Pg (Supports Unicode with a connect attribute, see documentation of DBD::Pg).

Alexander

On 13.04.2006 08:37, Nayeem (Zajil Com) wrote:

Actually when I fetch records from Database then I getting question marks
for arabic characters,  so any one can help me to solve this issue.


my $dbh = DBI->connect("dbi:ODBC:sms", "smser", "smspassword")
    || die  "Can't connect to $DBI::errstr";

my $sth = $dbh->prepare( q{
select Messagetype,message,mobilenumber from sms where status=0 }) || die "Can't prepare statement: $DBI::errstr";

my $rc1 = $sth->execute()
  || die "Can't execute the statement  : $DBI::errstr";

while (($Messagetype,$message,$mobilenumber) = $sth->fetchrow_array)
 {
  print "$message \n ";
}

Here printing question marks but in database data is in Arabic.

Thanks.




--
Alexander Foken
mailto:[EMAIL PROTECTED]  http://www.foken.de/alexander/

Reply via email to