Replacing tango.text.Ascii.isearch

rikki cattermole rikki at cattermole.co.nz
Wed Oct 26 06:04:08 UTC 2022


On 26/10/2022 6:49 PM, Siarhei Siamashka wrote:
> On Wednesday, 26 October 2022 at 05:17:06 UTC, rikki cattermole wrote:
>> if you are able to ignore that Unicode is a thing, I'd recommend it. 
>> It is complicated, as we humans are very complicated ;)
> 
> I can't ignore Unicode, because I frequently have to deal with Cyrillic 
> alphabet ;) Also Unicode is significantly simpler than a set of various 
> incompatible 8-bit encodings (such as 
> [CP1251](https://en.wikipedia.org/wiki/Windows-1251) vs. variants of 
> [KOI-8](https://en.wikipedia.org/wiki/KOI-8) vs. [ISO/IEC 
> 8859-5](https://en.wikipedia.org/wiki/ISO/IEC_8859-5)) that were 
> simultaneously in use earlier and caused a lot of pain. But I'm surely 
> able to ignore the peculiarities of modern Turkish Unicode and wait for 
> the other people to come up with a solution for D language if they 
> really care.

Cyrillic isn't an issue.

Lithuanian, Turkish and Azeri are the ones with the biggest issues.

There is a bunch of non-simple mappings for Latin, Armenian and Greek, 
but they are not language dependent. There is six conditional ones which 
are all Greek.

So if you are not dealing with these languages (even if you are, a 
simple replace should be easy to do for most), you should be fine with 
the simple mappings supported by std.uni.


More information about the Digitalmars-d-learn mailing list