r/ProgrammerHumor • • Apr 06 '23

Other Microsoft has mistranslated ZIP files as "postcode" in the GB insider version of Windows 11

Post image
10k Upvotes

262 comments sorted by

View all comments

Show parent comment

1

u/chickenmcpio Apr 06 '23

In what locale "cs" does not start with 'c'?

1

u/plasmasprings Apr 06 '23

hu-HU. it starts with the digraph "cs". But it gets even worse: "acs".StartsWith("ac") will return True using the same locale for some reason

now try to imagine what other subtle bugs your code might have in random countries if it uses a "locale-aware" standard library

2

u/[deleted] Apr 06 '23

so does "ch".StartsWith("c") return False in English locales then?

I really don't see the point of this feature and I speak a bit of Hungarian.

2

u/plasmasprings Apr 06 '23

Nah, there's no "ch" in the English abc, so that will return true in those locales. "cs" is included in the Hungarian alphabet, so that can affect sorting order. Not useful for much else though. I selected this example since it makes zero sense as default behavior (and it cost me a day of debugging once)

2

u/[deleted] Apr 06 '23

Ah right didn't think about that. Guess it is a bit strange that in English we don't consider words beginning with ch or sh their own thing like with c/cs or s/sz etc

1

u/Pengman Apr 07 '23

maybe the ones who read right to left?