Phenotype 3.0
Finally Multibyte
Version 3.0 is the first version with fully internal utf-8 encoding. So from now on a default Phenotype installation comes with UTF-8.
Last steps have been:
- exchanging of kses richtext filter in favour of HTMLPurifier
- adjusting package import/export to be PT_CHARSET dependet
Migration Info
- ISO-8859-1 backwards compatability
You may use Phenotype 3.0 for ISO-8859-1 websites by using a PT_CHARSET constant definition in the _config.inc.php.
define ("PT_CHARSET","ISO-8859-1");
Don’t forget to convert your UTF_8 database TO LATIN1.
There’s a helper function in the PhenotypeDatabase class:
$myDB->alterCollation('ISO-8859-1');
Most probably everything will work fine, but the focus of future development will be UTF-8.
- http headers
If you create a new page Phenotype will set it’s default header to “text/html; charset=utf-8”. For old pages you must change that value (Editor→Page→Script).
In most cases a mass update will do:
UPDATE page SET pag_contenttype = 101;
- mental switch
Should be self-evident, but here’s a reminder, what you have to take care of yourself:
- You have to switch your IDE project settings to UTF-8
- You must use multibyte functions for every string operation
- bugs
If you find any encoding related bugs, please report them at Sourceforge. Converting a grown project from single byte encoding to UTF-8 isn’t too trivial, so bugs are unfortunatetly probable.
- template (x)html headers
Caused by a page template handling change in Phenotype 2.10 you cannot write custom xhtml headers within a page template, since the <?xml directive is interpretated as PHP short open tag (and escaped for security reasons).
So please use following Smarty function for a correct XHTML/UTF-8 header, charset isn’t needed.
{pt_doctype dtd="XHTML1.0-Transitional"}
Please read the section about Phenotype 2.10 for further relevant changes/additions.
You think Phenotype Wiki/Documentation could be better?
We too. Please contribute: Edit this page
Recent Blog Posts
- Finally Multibyte - Phenotype 3.0
- Phenotype 2.9 explained
- Integration of PHPIDS (PHP-Intrusion Detection System)
- New Release: Phenotype 2.8 Ready for Download
- Restart: New Phenotype Website Live
- Phenotype worth: 2 Million $
- New Feature: Automatic Image Version Creation
- Additional smartURL variable: smartPATH
