Yii Framework Forum: Table Encoding Vs File Encoding - Yii Framework Forum

Jump to content

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

Table Encoding Vs File Encoding Rate Topic: -----

#1 User is offline   oliveira 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 20-January 14

Posted 20 January 2014 - 11:29 AM

Good Afternoon,

I'm trying to make a search in the database in order to see if a record already exists in the database with the next code snippet, if it this simply updates...

$model = $args[0]::model()->findByAttributes(array($fields[0] => $cols[0]));


The problem is that my database collation is ISO-8859-1 and the file being imported is UTF-8...is there a way to overcome this in the code above...

Code to import the UTF-8 csv file
 $file = Yii::app()->request->baseUrl . "/import/" . $args[0] . ".csv";


Best Regards,
Rui Oliveira
0

#2 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,689
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 20 January 2014 - 11:48 AM

Have you set 'charset' param in db section of config file?
God is real unless declared as integer
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