abidshahzad4u Posted June 3, 2009 Share Posted June 3, 2009 Hi dears New to this forum but not development How can I add Urdu/Arabic into PHP pages. I have already implemented UTF-8 encoding but the text appears to be question mark series. Also how to store Urdu/Arabic language to MySQL database. thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/160746-working-with-urduarabic-languages/ Share on other sites More sharing options...
JonnoTheDev Posted June 3, 2009 Share Posted June 3, 2009 I have already implemented UTF-8 Explain how you have done this. For MySQL make sure you have chosen the correct encoding for your tables. Also use this query after connecting to the database prior to any insert query: mysql_query("SET NAMES UTF8"); Quote Link to comment https://forums.phpfreaks.com/topic/160746-working-with-urduarabic-languages/#findComment-848455 Share on other sites More sharing options...
abidshahzad4u Posted June 5, 2009 Author Share Posted June 5, 2009 Sorry for too late thanks for suggesting database information. I have added this in the meta tag like <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> but I was still unable to get correct Urdu/Arabic words, just only question marks Quote Link to comment https://forums.phpfreaks.com/topic/160746-working-with-urduarabic-languages/#findComment-850106 Share on other sites More sharing options...
JonnoTheDev Posted June 5, 2009 Share Posted June 5, 2009 use a php header to set the content type header('Content-type: text/html; charset=utf-8'); Quote Link to comment https://forums.phpfreaks.com/topic/160746-working-with-urduarabic-languages/#findComment-850238 Share on other sites More sharing options...
abidshahzad4u Posted June 6, 2009 Author Share Posted June 6, 2009 Would like to put a little example. I can't understand how to implement this. I this where to place herader. in the start of the page once or every time when some urdu/arabic text come. I have embed them with in english or other languages. Quote Link to comment https://forums.phpfreaks.com/topic/160746-working-with-urduarabic-languages/#findComment-850416 Share on other sites More sharing options...
Daniel0 Posted June 6, 2009 Share Posted June 6, 2009 Have you saved your files as UTF-8 as well? Functions such as htmlentities also take a charset argument. Quote Link to comment https://forums.phpfreaks.com/topic/160746-working-with-urduarabic-languages/#findComment-850436 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.