Part of the EllisLab Network
   
 
problem with languges like persian and arabic
Posted: 29 October 2009 02:48 PM   [ Ignore ]  
Summer Student
Total Posts:  18
Joined  10-20-2009

Hello, for my website http://www.valuatemywebsite.com i xant to add languge arabic, hebrew ,and persian but i have probelme with caracteers , i wraite my file infos_lang.php but when it loads i have noticed that i get ??? marks instead of googd caracters.

I note that i set googe paramters in html,
any help

Profile
 
 
Posted: 29 October 2009 04:28 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  254
Joined  07-16-2008

You might want to use something like UTF-8 as your charset in all your files and database as that will work with almost any language.

Profile
 
 
Posted: 29 October 2009 05:01 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  18
Joined  10-20-2009

you mean for database i will use utf8_bin , because i have multiple choice .
And in html i will use only charset=“utf8”  ??
i ask because in mysql whihc i can use utf8_bin or utf8_unicode ?

Profile
 
 
Posted: 29 October 2009 06:26 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  254
Joined  07-16-2008

utf8_unicode_ci in mysql and html set charset to UTF-8 (not utf8). Remember to save the html documents(or view files) in utf-8 format too(without byte-order mark (BOM)), not just change the code.

Profile
 
 
Posted: 30 October 2009 10:31 AM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  389
Joined  06-19-2009

When you create the database in MySQL using phpMyAdmin you did to go to the operations tab and change the collate to utf8_unicode.ci or else it will default to latin1.

Enjoy
InsiteFX

 Signature 

Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc.

Everyone want’s HELP but they do not POST CODE! - POST YOUR CODE…

Profile
 
 
Posted: 30 October 2009 02:09 PM   [ Ignore ]   [ # 5 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1092
Joined  05-17-2008

There is a nice post about UTF-8 in CodeIgniter:
http://philsturgeon.co.uk/news/2009/10/UTF-8-support-for-CodeIgniter

Profile
 
 
Posted: 31 October 2009 05:23 AM   [ Ignore ]   [ # 6 ]  
Summer Student
Total Posts:  18
Joined  10-20-2009

thanks you for your answers, i anderstand your some of your propositions but this doesn’t correct my problem :
in my website http://ar.valuatemywebsite.com/  i want to support arabic so, i coded a file infos_lang.php and in this file i define for example links and titles but i don’t want in which format i must save the file infos_lang.php ?
this is my lang file sample :

$lang[‘infos_home’] = “حخهه”;
$lang[‘infos_blog’] = “”;
$lang[‘infos_contact’] = “Contact”;
$lang[‘infos_about’] = “A propos”;

Profile
 
 
Posted: 31 October 2009 08:08 AM   [ Ignore ]   [ # 7 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  254
Joined  07-16-2008

In that page you have still charset set to utf8. It should be utf-8.

<meta http-equiv="Content-Type" content="text/html; charset=utf8">

..change to

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

The problem probably is not because of that but you should fix that.
Just make sure everything is UTF-8. Save infos_lang.php(and other files too) as utf-8.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120201 Total Logged-in Users: 66
Total Topics: 126330 Total Anonymous Users: 4
Total Replies: 664389 Total Guests: 486
Total Posts: 790719    
Members ( View Memberlist )