> In the eyes of interoperability and standard, unless there's a strong and 
compelling reason to add "UTF-8" to the spec, why specify a character set 
at all? What benefit is there in artificially limiting the available 
strings?

Quick example: you want to log every service names that were called more 
than X time per request, let's say. When you know that it is UTF-8 string, 
you can easily in MySQL with utf8 charset, but when you don't know... You 
are in position like "argh, do I need to store it like binary string just 
because someone allowed everything?". 

Nobody likes vague contracts (expecting lawyers, maybe). Limitations help 
make things precise.

On Thursday, November 17, 2016 at 11:23:20 PM UTC+3, Anthony Ferrara wrote:
>
> All,
>
> On Wed, Nov 16, 2016 at 9:37 AM, GeeH <ga...@hock.in <javascript:>> wrote:
>
>> After discussion with Larry last night I suggested an edit that states 
>> that all containers should support a valid PHP string in UTF-8 format. I 
>> made that suggestion on the pull request.
>>
>
> My suggestion would be not to specify "UTF-8" character encoding. 
>
> There are a few reasons for this, but to put it quickly:
>
> 1. There are plenty of other character sets in common use around the 
> world. Why limit it?
>
> 2. The notion of variance suggests that implementers of the interface can 
> accept more than UTF-8. That's awesome. However, those that depend cannot 
> without losing the benefit of the interface. This effectively prevents 
> anyone from sing the interface unless they use UTF-8 in the first place.
>  
> In the eyes of interoperability and standard, unless there's a strong and 
> compelling reason to add "UTF-8" to the spec, why specify a character set 
> at all? What benefit is there in artificially limiting the available 
> strings?
>
> Why not simply say "support all valid PHP strings" which would by 
> definition be a super-set of UTF-8, and indeed be any representable 
> character no matter the encoding.
>
> My suggestion anyway.
>
> Anthony
>

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/8f9916d0-1ff4-4c6a-993a-54e90139eceb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to