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
On Thu, 6 Jun 2002, Michal Cihar wrote:
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).
I think the second one would be better. PMA_mysql_query(something) is definetly easier to read and maintain than the first method.
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.
Definetly splitting the patch up will get code accepted and tested faster.
Short summary what is currently included in patch:
- added conversion functions into libraries/common.lib.php3
How big are they? They might belong in a new file instead. Possibly libraries/langconv.lib.php3
- added lang/{czech,english}-utf8.inc.php3
Could you write some documentation on how people should write UTF-8 translations?
How well tested is this patch in terms of browsers? Is there any danger of it breaking older or uncommon systems. One testcase I would like to see is using PMA from a web-enabled cell phone.