[fw-general] View-Helper: JavaScript-Array

2009-04-11 Thread Innocentus
Dear Friends, I have got a custom view-helper which could be called multiple times. The view-helper should create a javascript-array and render it out as an HeadScript. The problem is that the view-helper is intended to return a string immediately after he is called from the view. What I want is

AW: AW: [fw-general] Zend JSON umlaut (special chars)

2009-04-11 Thread Stefan Gehrig
That's correct... I assumed that the whole application should run on UTF-8. The best way then would be to issue the "SET NAMES 'utf8'" query on a connection basis just for the given problem, which would result in: Zend_Registry::get('db')->query("SET NAMES 'utf8'"); $states = Zend_Registry::get('d

Re: AW: [fw-general] Zend JSON umlaut (special chars)

2009-04-11 Thread Benjamin Eberlei
That advice on the Mysql Init Attribute is dangerous. Its not just adding this easily, because if the app is already in production and running on another charset you might break it. On Saturday 11 April 2009 10:52:34 Stefan Gehrig wrote: > Hi Andrei, > > > > please make sure that your data is UT

AW: [fw-general] Zend JSON umlaut (special chars)

2009-04-11 Thread Stefan Gehrig
Hi Andrei, please make sure that your data is UTF-8 encoded. Either run your retrieved data through utf8_encode() or make sure that the result returned from the database is UTF-8. When using MySQL (Zend_Db_Adapter_Pdo_Mysql) you can easily do this by adding a 'driver_options' key to your data