4 ms·
tolower() works mostly well in ASCII and languages which don't have weird rules (=works mostly well in english).
by wereHamster 4y ago
tolower() works mostly well in ASCII and languages which don't have weird rules (=works mostly well in english).
- 3np 4y agoThe context is e-mail addresses, not English.
- stouset 4y agoI think that's GP's point: tolower() looks like it works well to English speakers but it's subtly wrong and will fail unexpectedly for people with other locales.
- gumby 4y agoThose rules are only weird to you, but perfectly reasonable to others, such as Turkish or German speakers…well, readers :-)
- msh 4y agoInternalization is hard. I think its too much to expect software written for a specific market to handle all languages in the world. Fx in danish we have 3 letters (æøå) that is not common in the latin alphabet. I cant go to germany or turkey and expect people to be able to write out those letters when doing input in a local system.
- MandieD 4y agoFun thing I've run into in a Germany-based but increasingly international company: German always spells out umlauts and eszetts when going to lower ASCII for email addresses ("Schäßler" -> "Schaessler"), but Hungarian does not. Not sure how Turkish ö and ü get fully lower-ASCII-ized there, but in Germany, they get spelled out "oe" and "ue" as if they were German ö and ü. This isn't as much of a corner case as one might think - there are a lot of people with Turkish names in Germany.
- gumby 4y agoI’m always amused by these kinds of nonsensical usage for Turkish in Germany (ü->ue) but the thing that really trips people up is that Turkish has two letters that look like i, one with the tittle and one without — in both cases. Germany relatively adopted an uppercase ß (and got it into Unicode) to try to help with case roundtripping but I’ve never seen it in the wild. And let’s not get into obsolete German Fraktur ligatures like tz or ch which also had no upper case equivalents.
- bmn__ 4y ago> Germany relatively adopted an uppercase ß (and got it into Unicode) The parenthetical part is true. It was an uphill battle, but not because of the consortium, but because of what the tropes wiki would describe as executive meddling. The adoption is not recent, but about 110 years old. You have the wrong idea because of sloppy journalism. > I’ve never seen it in the wild I see it all the time. Maybe you are undercounting. Pay attention to non-standard letterforms on hand-written signs, and you also have to include print media where someone substituted lower-case ß in absence of a glyph in a font. This is a typographic mistake, but the intent is clear.
- Dylan16807 4y ago> to try to help with case roundtripping I don't think that's right. It's used in certain contexts like all caps.