Clarifications about enconding and collation

Talk about Multi-Language tricks, problems, errors etc.

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

tomasafonso
Senior
Senior
Posts: 48
Joined: Mar 12th, '09, 16:28

Clarifications about enconding and collation

Postby tomasafonso » May 26th, '09, 09:07

Hello.

I'm write from spain. In all my pages I always keep these commented lines

Code: Select all

//$dg_encoding = "utf8";
//$dg_collation = "utf8_unicode_ci";
//$dgrid->SetEncoding($dg_encoding, $dg_collation);


because the previos line says than utf8 are the default encoding.

Well, now come the ask.

Why if i uncoment this tree line get an error?

Fatal error: Call to a member function SetEncoding() on a non-object in C:\xampp\htdocs\version8\usuariosProyectoaGrupo.php on line 82

Thanks

administrator
Site Admin
Site Admin
Posts: 5992
Joined: Jan 7th, '09, 23:18
Contact:

Re: Clarifications about enconding and collation

Postby administrator » May 29th, '09, 22:21

all these lines:

Code: Select all

$dg_encoding = "utf8";
$dg_collation = "utf8_unicode_ci";
$dgrid->SetEncoding($dg_encoding, $dg_collation);


must be written after

Code: Select all

$dgrid = new DataGrid($debug_mode, $messaging, $unique_prefix, DATAGRID_DIR);


Use version 5.0.6


Return to “Multi-Language implementation”