Re: Accessing non-binary Unicode properties with std.uni

2020-09-29 Thread Chloé Kekoa via Digitalmars-d-learn

On Tuesday, 29 September 2020 at 17:04:51 UTC, H. S. Teoh wrote:
OTOH, the relevant Unicode data file that contains 
East_Asian_Width data (EastAsianWidth.txt) is relatively 
straightforward to parse.  In one of my projects, I wrote a 
little helper program to parse this file and generate a 
function that tells me if a given dchar is wide or narrow.


Thank you. Analyzing the data file seems simple enough. :)



Accessing non-binary Unicode properties with std.uni

2020-09-28 Thread Chloé Kekoa via Digitalmars-d-learn
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