Resolution: Won't Do
Component/s: Standard Library
- Swift 4.0
- OS: macOS, Ubuntu 16.04
The Swift code below will be compiled without any errors, although it does not conform to Unicode segmentation algorithm.
An error is raised such as "error: cannot convert value of type 'String' to specified type 'Character'".
- UAX #29
> Do not break within emoji flag sequences. That is, do not break between regional indicator (RI) symbols if there is an odd number of RI characters before the break point.
> GB12 sot (RI RI)* RI × RI
> GB13 [^RI] (RI RI)* RI × RI
- UTS #51
> emoji flag sequence — A sequence of two Regional Indicator characters, where the corresponding ASCII characters are valid region sequences
> A singleton Regional Indicator character is called an ill-formed emoji flag sequence.