From: Martin F. <mar...@gm...> - 2007-07-26 05:49:01
|
Hello, On 25.07.2007 22:26:37 Victor Boctor wrote: > Hi Paul, > On 7/25/07, Paul <pa...@qu...> wrote: > > > + require_once( $t_core_dir . 'gpc_api.php' ); > > > + > > > > do we need gpc_api? > I didn't include it in my initial patch but for some reason the user > who tested it told me it was required. Now that I think about it, it > doesn't make sense since it is in core.php. Will remove. The include is needed for the lang_get() call in this line: $c_charset = db_prepare_string( lang_get( 'charset' ) ); Without gpc_api you get a PHP error about missing the lang_get() function. > > Whilst not having thought about this in any great detail, this strikes me > as > > being dangerous - in a multiple language environment, are we potentially > > saying that *sometimes* we'll set it for utf-8 but not always depending on > > the user. I.e. if someone submits a bug in utf8 support and a developer > who > > isn't using a utf8 charset then goes to edit the report aren't we going to > > hit potential problems? > I am personally not sure of the impact of setting the encoding of the > connection. Hence, I went with the option of limiting when this is > called as much as possible. The hope is that once a Mantis instance > uses UTF8, then it uses it for all languages. But that is not always > the case. If you have a suggestion here please let me know. This statement is also the line which takes into account the language setting of the current user. However I personally would like to use Unicode for all languages. Otherwise the database connection would have to be set up for the special encoding (iso-8859-1, iso-8859-9, etc.), instead PHP's default setting. Regards, Martin |