[Phpmyadmin-devel] Code cleanup - $charset global variable

Piotr Przybylski piotr.prz at gmail.com
Thu Mar 10 17:55:52 CET 2011


In many files there are about 80-100 references to $GLOBALS['charset']
(or just $charset) variable, which is always set to 'utf-8'. It is not
a change that should go now, but after 3.4 is released I propose to:
- remove all references where it is used to generate HTTP headers and
HTML (we already have it hardcoded in many places)
- remove this variable and introduce it as a constant or, if only a
few references remain, just use string literals

A quick glance at code also revealed some a possible bug in comparison
with $charset_of_file - this var stores one of MySQL compatible
charset names, while our variable stores "utf-8", not "utf8".

I can prepare an appropriate patch and commit it after 3.4 is released.

-- 
Piotr Przybylski




More information about the Developers mailing list