[Phpmyadmin-devel] About patch 539183 - Different charsets in HTTP and MySQL

Michal Cihar nijel at users.sourceforge.net
Thu Jun 6 13:54:05 CEST 2002


Hi everybody

I just discussed with Marc about this patch and because there are some things 
that should be discussed by more people here, I sent some information about 
it here.

Because this patch is really huge (summary follows), Marc proposed to split 
it into some smaller pieces and to make some other changes. The most 
important is to change almost every call to mysql to PMA function in which 
could be optionaly done charset conversion. In current patch this conversion 
is added to each mysql call so code looks like:
mysql_query(PMA_convert_charset(something))
when there would be PMA functions wrapping almost all MySQL functions it 
would look like:
PMA_mysql_query(something)

What do you think is better? The second way surely looks better, is a bit 
simplier to maintain and would allow later to make some other mysql calls 
modifications much faster. The first one should be a bit faster (one function 
call less) and is already implemented (IMHO the change to second one 
shouldn't be much complicated since majority of changes to this I did 
automatically using some sed expressions).

Without reference to this I will split from my patch some parts which really 
don't belong there and appeared there just because there were some bugs in 
PMA code when using non ascii characters and I found them during testing this 
patch.

Regards
	Michal Cihar
	nijel at users dot sourceforge dot net
	http://cihar.liten.cz

----------------
Short summary what is currently included in patch:
- added conversion functions into libraries/common.lib.php3
- added configuration options in config.inc.php3
- added documentation about new configuration options
- added conversion to each mysql query and mysql fetch (and common functions)
- added convcharset variable to all links and forms
- added 3 messages in lang/*.inc.php3 (strCantLoadRecodeIconv, 
strCantUseRecodeIconv, strMySQLCharset)
- added lang/{czech,english}-utf8.inc.php3
- fixed qbe for tables with non-latin1 chars (FROM clause)
- improved PMA_backquote to work on array also (needed by previous change)
- fixed SQL query dumps in libraries/display_tbl.lib.php3 and tbl_change.php3




More information about the Developers mailing list