User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,553 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,493 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1875 | Replies: 6
Reply
Join Date: Sep 2007
Posts: 25
Reputation: roy-- is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
roy-- roy-- is offline Offline
Light Poster

Help inserting arabic characters into mysql

  #1  
Oct 17th, 2007
Hello,

I have looked everywhere on the web for a solution to this problem.

I am trying to store arabic characters into mysql via an html form.

i have set the meta charset to utf-8 and have tried mysql_query('set names 'utf=8'")

but still i get garbled characters in my table:

لربيلبي

Please advise!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 252
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 14
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: inserting arabic characters into mysql

  #2  
Oct 17th, 2007
Do a favour, leave me alone
Reply With Quote  
Join Date: Sep 2007
Posts: 25
Reputation: roy-- is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
roy-- roy-- is offline Offline
Light Poster

Re: inserting arabic characters into mysql

  #3  
Oct 18th, 2007
thanks faith but that didnt help with my problem.

:/
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 252
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 14
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: inserting arabic characters into mysql

  #4  
Oct 18th, 2007
did you try ansi_unicode_?
Do a favour, leave me alone
Reply With Quote  
Join Date: Dec 2006
Location: syria
Posts: 158
Reputation: w_3rabi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 8
w_3rabi's Avatar
w_3rabi w_3rabi is offline Offline
Junior Poster

Re: inserting arabic characters into mysql

  #5  
Oct 20th, 2007
i have something like this
i insert data into db
in the db the data is not readable
but when select it on a php page
everything goes well
so the application is running anyway
programming is an art ,only for those who can understand it.
- th3 php wr3nch -
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 252
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 14
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: inserting arabic characters into mysql

  #6  
Oct 20th, 2007
is it local or remote located database?
if locale chech my.ini, find default charset and change it to ansi_unicode
collation in the same way.
Do a favour, leave me alone
Reply With Quote  
Join Date: Sep 2007
Posts: 25
Reputation: roy-- is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
roy-- roy-- is offline Offline
Light Poster

Re: inserting arabic characters into mysql

  #7  
Oct 21st, 2007
Got it working!

mysql_query("set names 'utf8'");

Thanks everyone for your replies..
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 5:20 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC