Re: What "Unicode support" really means

From: Date: Sun, 09 Mar 2014 22:44:49 +0000
Subject: Re: What "Unicode support" really means
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-73036@lists.php.net to get a copy of this message
Andrea Faulds wrote:
So the road path for PHP6 should be that the bulk of variable/function names will only ever use ASCII-7 characters? Stopping those holes that currently allow some unicode strings to push through there currently? If the core code base is not going to support unicode - and I include unicode variables automatically created from XML and database data - then so be it. In which case there is nothing to fix as we just stick with mbstring to handle the data content of variables?
I think we should move to only using the traditional ASCII-7 subset for all identifier names. It should be case-sensitive for everything, too.
I don't think those two necessarily go together. Personally I think that making everything case sensitive is the first step to allowing Unicode identifier names. Then it is easy to say that names simply match so that 'normalization' is not a problem either! Just make strings with any different set of bytes a different string. But I suspect that there may be a greater preference to retain case insensitivity at which point ASCII becomes a given - I think?
That said, mbstring is not a good solution for handling variable content. PHP needs to have proper Unicode support that doesn’t cause confusion and that allows people to write modern web apps that can handle Unicode text properly, without too much difficulty. At present we have a standard library of string functions which don’t necessarily work correctly with Unicode text. This has to change.
Yep - personally I don't use mbstring despite all web pages being UTF-8 and have been or many years. I use the database to handle the difficult stuff and then just pump 'clean' unicode down the pipe. The problem I am trying to untangle is the simple fact that database field names are now unicode, and I need to disbale anything that tries to use them for 'magic' purposes in PHP, which is difficult since all the data is returned as associative strings, and switching to numeric returns simply pushes the problem elsewhere :( -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

« previous php.internals (#73036) next »