Re: [RFC] Unicode Text Processing
| From: | Paul Crovella | Date: | Thu, 15 Dec 2022 17:15:19 +0000 |
| Subject: | Re: [RFC] Unicode Text Processing | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-119154@lists.php.net to get a copy of this message | ||
On 12/15/2022 7:34 AM, Derick Rethans wrote:
https://wiki.php.net/rfc/unicode_text_processingA few quick thoughts:
The constructor will also convert the given text to Unicode Canonical Form.By this do you mean Normalization Form C (NFC)? "Unicode Canonical Form" isn't a phrase I'm familiar with. Assuming so, are modified texts (e.g. via join, replaceText, reverse) re-normalized? ---
The constructor will also strip out a BOM (Byte-Order-Mark) character, if present.This is also known as ZWNBSP (Zero Width No-Break Space). Will only a leading instance be stripped? If so, how can someone search for it (or a substring beginning with it) given that:
If an argument to any of the methods is listed as string|Text, passing in a string value will have the same semantics as replacing the passed value with new Text($string).and all the search methods take
string|Text $search.
---
Why is this being introduced directly into PHP core rather than first an extension where it's easier to shake out the interface and behavior?