for arabic characters getting question marks while fetching rows from ms sql Database

------=_NextPart_000_03A9_01C65EDD.F1C43970
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

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.


------=_NextPart_000_03A9_01C65EDD.F1C43970--

0
nayeem
4/13/2006 6:37:56 AM
perl.dbi.users 11098 articles. 1 followers. Follow

1 Replies
797 Views

Similar Articles

[PageSpeed] 38

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:alexander@foken.de  http://www.foken.de/alexander/

0
alexander
4/13/2006 8:22:10 AM
Reply:

Web resources about - for arabic characters getting question marks while fetching rows from ms sql Database - perl.dbi.users

List of Killzone characters - Wikipedia, the free encyclopedia
Cpl. Dante Garza is a loyal, optimistic and likable character- an effective team player. A close companion of Sev, the pair have served together ...

Jack & Coke renamed "The Lemmy" by Food & Beverage magazine; Lemmy now a GTA V character
by Rob Sperry-Fromm In the wake of Lemmy's passing, tributes to the Motorhead frontman have come from all over the place, including a petition ...

A deleted scene from 'Star Wars: The Force Awakens' reveals a new character's awesome power
Maz Kanata's castle plays a larger part in "The Force Awakens" than the character herself, but she's more powerful than you realized watching ...

Nintendo promises “big characters” like Mario coming to smartphones this year
... by 2017. The first Nintendo game for smartphones, though, was delated until March, and worse, features none of Nintendo’s best known characters. ...

Barbara Allyne Bennet Dies: Veteran Character Actress Was 76
Barbara Allyne Bennet , a veteran character actress and former SAG board member, has died January 9. She was 76. A Cleveland native, Bennet moved ...

'Walking Dead' Star Lauren Cohan Says Fans Should Be 'Concerned' for Her Character
'Walking Dead' Star Lauren Cohan Says Fans Should Be 'Concerned' for Her Character

'Lucifer' Review: An Unsure Pilot With Big Character Based Potential
Lucifer is coming to Fox, but describing the show is harder than one might imagine.

How Marceline Became One of Adventure Time’s Most Fascinating Characters
Marceline the Vampire Queen was a lot of fun in her first appearances on Adventure Time , but nobody could have predicted how much she’s evolved, ...

Maddow Accuses Clinton Of 'Casting Aspersions' On Bernie Sanders' Character
Clinton insisted she and Sanders "engage on substantive differences."

'Star Wars: Episode 8' Could Reveal Rey's Identity; J.J. Abrams Admits He Knows 'Quite A Bit' About Character ...
"Star Wars" fans could get answers to who Rey really is when "Episode 8" is released in May 2017.

Resources last updated: 1/17/2016 4:44:25 PM