Yii Framework Forum: Facing problem with search in Arabic Language - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Facing problem with search in Arabic Language

#1 User is offline   modsindex 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 28-November 15

Posted 16 September 2016 - 05:14 AM

Hi,

I am facing problem with search in Arabic Language on my live store hosted on Azure. I am using Yii1.2 framework.
On local xampp Search is working fine with Arabic Language. but when same code and database structure on live app not giving me search result.

table type: MyISAM
Character set: utf8-utf-8 Unicode
Collation: utf8_unicode_ci

Fields:
name, item_no
type: varchar
Character set: utf8
Collation: utf8_unicode_ci
0

#2 User is offline   Muaid 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 138
  • Joined: 25-October 10
  • Location:Saudi Arabia

Posted 18 September 2016 - 06:21 AM

Hi modsindex,

There is no Yii 1.2. only Yii 1.1.x and Yii 2.

I am not familiar with Azure cloud services but i can list for you the important elements so you can start looking for the issue. for this problem we have to make sure all the following:

  • php configuration file <ini>: you have to make sure the default encoding is utf8. <example: default_charset = "utf-8">
  • mysql encoding: i think you already did this step but its worth mentioning.
  • mysql connection string: the link to connect from php to mysql should be set encoding to utf-8. in Yii config.php find database component and add: 'charset' => 'utf8',
  • mysql collection for (db, tables, fields).
  • html output: should contain the meta tag for encoding and set to utf8. <head><meta charset="UTF-8"></head>
  • web server: (Apache, Nginx ,, etc): you have to make sure to set the default encoding to utf8. << not sure about how much important this is.
  • php files: which contains arabic better to be saved as utf8. << not sure about how much important this is.
here is some refrences that may help:

https://azure.micros...-php-configure/

Yii 2 (yii\db\Connection class charset) http://www.yiiframew...$charset-detail

Yii 1.1 (CDbConnection class charset) http://www.yiiframew...#charset-detail

i hope the above point will solve your issue. keep me posted if you find what you were looking for. wish you the best.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users