Hi all
I see that we've documented ctype and mbstring as dependencies, while we still have huge amount of code (PMA_String and related classes) to be able to handle situations when those are not available. This situation should be fixed for next release :-). But there are some open questions:
- there is no check that ctype is actually loaded, so we don't enforce this dependency, so do we really want it as hard dependency?
- mbstring is required for gettext so this one probably has to be there
- the PMA_String class could mostly go away in case we would directly use ctype and mbstring functions - removing one abstraction layer and gaining back a little bit of performace
Michal Čihař a écrit :
Hi Michal, how do you explain bug #4036 if these situations are handled? [0]
[0] https://sourceforge.net/p/phpmyadmin/bugs/4036/
Hi
Dne Wed, 21 Aug 2013 12:47:09 -0400 Marc Delisle marc@infomarc.info napsal(a):
That's in php-gettext, what could be potentially workarounded (as we have all translations in utf-8). We have quite a lot of code to deal with absence of mbstring in PMA_String and related classes.
The question is: Do we want to support systems without mbstring extension? If no, we can simplify quite a lot of our code, if yes, we should fix this single case for php-gettext.
On 8/21/13 3:59 PM, Michal Čihař wrote:
My opinion is that the fewer requirements we have, the better, especially since the code already exists. For now, mbstring is non-default in PHP installations, so we can't assume a hosting provider will provide it. I realize we can't always work towards the minimum standards and may have to require it at some point in the future, but for now I feel we should support non-mbstring systems. That being said, I do realize it's more work for someone to maintain, but still think it's the better solution right now.
Cheers
Michal Čihař a écrit :
How about moving in the doc, in a section separate from Requirements (could be called Performance suggestions), the mention of ctype extension?
Would the workaround imply a change in php-gettext itself?
Also, I am wondering. Before my change in the doc, we could read:
"For proper support of multibyte strings (eg. UTF-8, which is currently the default), you should install the ``mbstring`` and ``ctype`` extensions."
So, is ctype required for php-gettext?
As Isaac said, the fewer requirements we have, the better.
Hi
Dne Thu, 22 Aug 2013 08:14:22 -0400 Marc Delisle marc@infomarc.info napsal(a):
Something like that.
I don't see other way than patching it - we basically don't need any of the functionality provided by _encode function as our locales are in UTF-8 and same is the user interface, so this function does nothing after detecting that text is UTF-8 and output as well.
No, all it uses is mbstring for charset conversion.