Re: Unicode support

From: Date: Wed, 15 Oct 2014 15:11:13 +0000
Subject: Re: Unicode support
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-78097@lists.php.net to get a copy of this message
On 15/10/14 15:58, Rowan Collins wrote: Rowan,
What is confusing me is that i think you're seeing it as a major implementation defect. To avoid arguable implementations, i've made short example in Java: System.out.println(new StringBuffer("noël").reverse().toString()); It does produce string "l̈eon" as i would expect.
Why do you expect that? Is this a result which would ever be useful?
I think expect it to work this way because i know that this is a good trade-off between performance and produced result. It also leaves a possibility to do it better if i need to.
To be clear, I am suggesting that we aim to be the language which gets this right, where other languages get it wrong.
Thank you for explaining this. I also think it could do better. I think Unicode-aware strrev() shouldn't be too complicated to do.

« previous php.internals (#78097) next »