Replacing tango.text.Ascii.isearch

rikki cattermole rikki at cattermole.co.nz
Fri Oct 28 22:23:21 UTC 2022


On 29/10/2022 11:05 AM, Siarhei Siamashka wrote:
> And as for the D language and Phobos, should "ß" still uppercase to 
> "SS"? Or can we change it to uppercase "ẞ" and remove German from the 
> list of tricky languages at 
> https://dlang.org/library/std/uni/to_upper.html ? Should Turkish be 
> listed there?

That particular function, is based upon the simple mappings provided by 
UnicodeData.txt and (should be) in compliance of the Unicode standard.

The only thing we need to do is regenerate the tables backing it 
whenever Unicode updates.

Note the behavior you are asking for is defined in the Unicode database 
file SpecialCasing.txt which have not been implemented.

```
# The German es-zed is special--the normal mapping is to SS.
# Note: the titlecase should never occur in practice. It is equal to 
titlecase(uppercase(<es-zed>))

00DF; 00DF; 0053 0073; 0053 0053; # LATIN SMALL LETTER SHARP S
```

That file is how you support languages like Turkish. We currently don't 
have it implemented. It requires operating on a whole string and to pass 
in what language rules to apply (i.e. Turkish, Azeri).


More information about the Digitalmars-d-learn mailing list