nydiow
(Nydiow)
March 30, 2010, 1:46pm
1
Hi guys, first of all thanks for everybody here that is helping me with Yii Framework…
Now after figure out how to use my language accents (like são, é, açucar) im having problems with MS SQL Server 2005 Data
Im almost sure that the problemns is the config of the database (protected/condig/main.php)
Cause SQL Server doesnt accept charset…
'db'=>array(
//'class'=>'CDbConnection',
'connectionString' => 'mssql:host=192.168.0.52;dbname=stcpweb_db',
//'emulatePrepare' => true,
'username' => 'user',
'password' => 'pass',
// 'charset' => 'utf8',
),
If i remove the comment from charset i get this message:
Description
CDbConnection failed to open the DB connection: SQLSTATE[HY000]
if i keep that, works normal, but i cant read data with accents again…
Help me guys!
I´m using MSSQL 2005 too and I´m loving these Error Messages We have ISO-8859-1 encoded Data in existing Tables, the way to get it displayed with German umlauts was to change the charset of the application to iso-8859-1 in config/main.php
'charset' => "iso-8859-1",
unfortunately the ajax postbacks still are utf8 encoded, so ajax resorting of gridviews shows scrambled umlauts again :-/
hth,
Björn
nydiow
(Nydiow)
March 31, 2010, 1:14pm
3
brafreider:
I´m using MSSQL 2005 too and I´m loving these Error Messages We have ISO-8859-1 encoded Data in existing Tables, the way to get it displayed with German umlauts was to change the charset of the application to iso-8859-1 in config/main.php
'charset' => "iso-8859-1",
unfortunately the ajax postbacks still are utf8 encoded, so ajax resorting of gridviews shows scrambled umlauts again :-/
hth,
Björn
Well that is definitely something… now i can see the rows with crazy letters…
Like that…
For example: teste de vers�es should be teste de versões, but after ‘charset’ => “iso-8859-1” in config/main.php it wasnt even displaying the row…
Suggestions?
nydiow
(Nydiow)
March 31, 2010, 2:42pm
4
Problem solved…
I used the charset and <?php header("Content-Type: text/html; charset=ISO-8859-1",true) ?>
Some pages lost theirs accents so i used html_entity_decode("Transferências") to solve my problem…
Thanks…