Foren / Cotonti / Core Labs / Archive / Unicode support

Trustmaster
#1 15. August 2008, 09:16
Standard PHP functions like strlen() cannot deal with Unicode strings properly out of the box. They provide mbstring extension and a few more tricks to handle it. So, the options for proper Unicode support are:

1. Wait for PHP6 to come.
2. Replace all text processing functions with their mb_ equivalents and make straight use of mbstring extension.
3. Create wrappers to use both standard and mbstring functions. Will produce a great overhead though.
4. Ignore it. Unicode must die and bla-bla-bla.
May the Source be with you!
Kilandor
#2 15. August 2008, 16:15
I think we should go on and move to support unicode. It would be more appealing, and make people happy. Waiting for php6 could potentially take years. Whenever it becomes mainstream we can do what we need then.
Orkan
#3 15. August 2008, 16:44
vote for wrappers :)
Perl - the only language that looks the same before and after RSA encryption.
Trustmaster
#4 16. August 2008, 18:53
Mbstring functions should work with old encodings fine as well. And when PHP6 comes, it will be easy to roll them back to non-mb calls. So I vote for mbstring (2), since it's significantly less overhead than creating two-state wrappers.

Are there any mbstring problems on your hosts? I believe most hosts should have it.
May the Source be with you!
Dayver
#5 16. August 2008, 20:44
I think, Trustmaster 100% rights. I also vote for mbstring (2)
Pavlo Tkachenko aka Dayver
Orkan
#6 17. August 2008, 07:58
Mbstring functions should work with old encodings fine as well.
Ok, thanks. I wasnt sure of that, so you're right
Perl - the only language that looks the same before and after RSA encryption.