Accessing non-binary Unicode properties with std.uni

Dukc ajieskola at gmail.com
Tue Sep 29 16:22:18 UTC 2020


On Monday, 28 September 2020 at 18:23:43 UTC, Chloé Kekoa wrote:
> The documentation of std.uni [1] says that the unicode struct 
> provides sets for several binary properties. I am looking for a 
> way to query non-binary properties of a character. Is that 
> possible with std.uni or do I need to use a third-party library?
>
> I am specifically interested in the East_Asian_Width property 
> [2] (which has six allowed values). Trying to access 
> std.uni.unicode.East_Asian_Width results in the error message:
>
>> No unicode set by name East_Asian_Width was found.
>
> [1]: https://dlang.org/library/std/uni.html
> [2]: https://www.unicode.org/reports/tr11/tr11-38.html

It seems the East Asian width is Unicode standard 13.0, while 
Phobos implements 6.2. So seems like ca case for a third-party 
library :(.




More information about the Digitalmars-d-learn mailing list