Reading text (I mean "real" text...)

Paul Backus snarwin at gmail.com
Sat Jun 20 01:41:50 UTC 2020


On Saturday, 20 June 2020 at 01:35:56 UTC, Denis wrote:
>
> THE OBJECTIVE
>
> The objective is to read a file one line at a time (reading 
> each line into a string), while checking for human-readable 
> text character by character. Invalid characters (control and 
> UTF-8) should generate an exception.
>
> Unless there's already an existing function that works as 
> described, I'd like to write one. I expect that this will 
> require combining an existing read-by-UTF8-char or read-by-byte 
> function with the additional validation.

It sounds like maybe what you are looking for is Unicode 
character categories:

https://en.wikipedia.org/wiki/Unicode_character_property#General_Category


More information about the Digitalmars-d-learn mailing list